Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
e7a7dcb9
Commit
e7a7dcb9
authored
Dec 28, 2019
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
9c22351f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
19 deletions
+52
-19
igirl-channel-web/app/base/controller/ctl.base.js
+8
-0
igirl-channel-web/app/base/controller/impl/trademark/tmqueryCtl.js
+44
-6
igirl-channel-web/app/base/db/cache.base.js
+0
-1
igirl-channel-web/app/config/routes/web.js
+0
-12
No files found.
igirl-channel-web/app/base/controller/ctl.base.js
View file @
e7a7dcb9
...
...
@@ -5,6 +5,14 @@ class CtlBase {
constructor
()
{
this
.
cacheManager
=
system
.
getObject
(
"db.common.cacheManager"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
this
.
execClient
=
system
.
getObject
(
"util.execClient"
);
this
.
logUrl
=
settings
.
channelApiUrl
()
+
"/action/opLog"
;
}
error
(
param
,
token
)
{
var
tmp
=
await
this
.
execClient
.
execPostTK
(
param
,
this
.
logUrl
+
"/error"
,
token
);
}
info
(
param
,
token
)
{
var
tmp
=
await
this
.
execClient
.
execPostTK
(
param
,
this
.
logUrl
+
"/info"
,
token
);
}
getUUID
()
{
var
uuid
=
uuidv4
();
...
...
igirl-channel-web/app/base/controller/impl/trademark/tmqueryCtl.js
View file @
e7a7dcb9
...
...
@@ -11,9 +11,8 @@ class tmqueryCtl extends CtlBase {
1688
:
{
appkey
:
"201911131657"
,
secret
:
"eeb18393aade40149287b024d8ba0850"
},
gsbhome
:
{
appkey
:
"201912141625"
,
secret
:
"8cbb846776874167b5c7e01cd0116c66"
}
};
this
.
execClient
=
system
.
getObject
(
"util.execClient"
);
this
.
logClient
=
system
.
getObject
(
"util.logClient"
);
//
this.logClient = system.getObject("util.logClient");
}
async
doPost
(
pobj
,
obj
,
req
)
{
if
([
"subTmOrder"
,
"getTmOrderList"
,
"getTmOrderInfo"
,
"getTmApplyInfo"
,
"getTmNclList"
,
...
...
@@ -507,6 +506,12 @@ class tmqueryCtl extends CtlBase {
//----------------------------gsb------操作------------start
async
opGsbPayPageInfo
(
pobj
,
orderResult
,
req
)
{
//操作下单的数据跟渠道订单关联
this
.
info
({
optitle
:
"###操作下单的数据跟渠道订单关联参数"
,
op
:
"/gsbhome/opGsbPayPageInfo"
,
content
:
"pobj参数="
+
JSON
.
stringify
(
pobj
)
+
",orderResult="
+
JSON
.
stringify
(
orderResult
),
clientIp
:
""
});
if
(
!
pobj
.
actionBody
.
itemCode
)
{
return
system
.
getResult
(
null
,
"itemCode param is not empty"
);
}
...
...
@@ -536,10 +541,20 @@ class tmqueryCtl extends CtlBase {
isUser
:
"yes"
};
var
reqUrl
=
this
.
channelApiUrl
+
"/action/tmOrder/springBoard"
;
console
.
log
(
"req---->opGsbPayPageInfo---->params:"
+
JSON
.
stringify
(
param
)
+
",reqUrl:"
+
reqUrl
);
this
.
info
({
optitle
:
"###操作下单的数据跟渠道订单关联参数---请求subGsbOrderInfo"
,
op
:
"/gsbhome/opGsbPayPageInfo"
,
content
:
"参数:"
+
JSON
.
stringify
(
param
),
clientIp
:
""
});
var
payDataResult
=
await
this
.
execClient
.
execPostTK
(
param
,
reqUrl
,
tokenInfo
.
data
.
token
);
this
.
info
({
optitle
:
"###操作下单的数据跟渠道订单关联参数---请求subGsbOrderInfo----结果"
,
op
:
"/gsbhome/opGsbPayPageInfo"
,
content
:
"结果:"
+
JSON
.
stringify
(
payDataResult
),
clientIp
:
""
});
if
(
!
payDataResult
&&
payDataResult
.
status
!=
1
)
{
console
.
log
(
"req---->opGsbPayPageInfo---->error:"
+
JSON
.
stringify
(
payDataResult
));
return
system
.
getResult
(
null
,
"req error"
);
}
//更新订单信息
...
...
@@ -549,11 +564,23 @@ class tmqueryCtl extends CtlBase {
return
system
.
getResultSuccess
({
payUrl
:
payDataResult
.
data
.
order_detail_url
});
}
catch
(
error
)
{
console
.
log
(
"req---->opGsbPayPageInfo---->操作error:"
+
error
.
stack
);
this
.
error
({
optitle
:
"###操作下单的数据跟渠道订单关联参数---请求subGsbOrderInfo----异常"
,
op
:
"/gsbhome/opGsbPayPageInfo"
,
content
:
"结果:"
+
JSON
.
stringify
(
error
.
stack
),
clientIp
:
""
});
return
system
.
getResultFail
(
-
200
,
"操作error"
+
error
.
stack
);
}
return
system
.
getResultSuccess
();
}
async
pushGsbPayOrder
(
pushData
,
req
)
{
//处理公司宝推送的订单信息
this
.
info
({
optitle
:
"###处理公司宝推送的订单信息参数"
,
op
:
"/gsbhome/pushGsbPayOrder"
,
content
:
"pushData参数="
+
JSON
.
stringify
(
pushData
),
clientIp
:
""
});
try
{
var
signResult
=
await
this
.
createSign
(
pushData
,
"a7bbb13627cd11ea98c800163e06da98"
,
true
);
if
(
signResult
.
status
!=
0
)
{
...
...
@@ -583,16 +610,27 @@ class tmqueryCtl extends CtlBase {
};
var
reqUrl
=
this
.
channelApiUrl
+
"/action/tmOrder/springBoard"
;
var
resultUser
=
await
this
.
execClient
.
execPostTK
(
param
,
reqUrl
,
tokenInfo
.
data
.
token
);
this
.
info
({
optitle
:
"###处理公司宝推送的订单结果"
,
op
:
"/gsbhome/pushGsbPayOrder"
,
content
:
"result="
+
JSON
.
stringify
(
resultUser
),
clientIp
:
""
});
if
(
!
resultUser
)
{
return
system
.
getResult
(
null
,
"req error"
);
}
return
resultUser
;
}
catch
(
error
)
{
console
.
log
(
error
.
stack
,
"操作error..................."
);
this
.
error
({
optitle
:
"###处理公司宝推送的订单异常"
,
op
:
"/gsbhome/pushGsbPayOrder"
,
content
:
"error="
+
JSON
.
stringify
(
error
.
stack
),
clientIp
:
""
});
return
system
.
getResultFail
(
-
200
,
"操作error"
);
}
}
//----------------------------gsb------操作------------end
}
...
...
igirl-channel-web/app/base/db/cache.base.js
View file @
e7a7dcb9
...
...
@@ -19,7 +19,6 @@ class CacheBase {
}
async
cache
(
inputkey
,
val
,
ex
,
...
items
)
{
const
cachekey
=
this
.
prefix
+
inputkey
;
console
.
log
(
cachekey
,
"cachekey.............basecache"
);
var
cacheValue
=
await
this
.
redisClient
.
get
(
cachekey
);
if
(
!
cacheValue
||
cacheValue
==
"undefined"
||
cacheValue
==
"null"
||
this
.
isdebug
)
{
var
objvalstr
=
await
this
.
buildCacheVal
(
cachekey
,
inputkey
,
val
,
ex
,
...
items
);
...
...
igirl-channel-web/app/config/routes/web.js
View file @
e7a7dcb9
...
...
@@ -205,20 +205,8 @@ module.exports = function (app) {
res
.
redirect
(
skipUrl
);
});
app
.
get
(
"/gsbhome/orderNotify"
,
async
function
(
req
,
res
)
{
// logClient.payLog("jd", {
// optitle: "###操作订单结果参数...orderNotify",
// op: "/jd/orderNotify",
// content: "req.query=" + JSON.stringify(req.query) + ",req.body=" + JSON.stringify(req.body),
// clientIp: ""
// });
req
.
query
.
actionProcess
=
"gsbhome"
;
var
result
=
await
tmqueryCtl
.
pushGsbPayOrder
(
req
.
query
,
req
);
// logClient.payLog("jd", {
// optitle: "###操作订单结果...orderNotify",
// op: "/jd/orderNotify",
// content: "result=" + JSON.stringify(result),
// clientIp: ""
// });
if
(
result
.
status
!=
0
)
{
res
.
end
(
JSON
.
stringify
(
result
));
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment