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
d8ec4b52
Commit
d8ec4b52
authored
Dec 27, 2019
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
9f3046a1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
51 deletions
+36
-51
igirl-channel-web/app/base/controller/impl/trademark/tmqueryCtl.js
+17
-31
igirl-channel-web/app/base/utils/smsClient.js
+1
-1
igirl-channel-web/app/config/routes/web.js
+18
-19
No files found.
igirl-channel-web/app/base/controller/impl/trademark/tmqueryCtl.js
View file @
d8ec4b52
...
...
@@ -555,46 +555,32 @@ class tmqueryCtl extends CtlBase {
}
async
pushGsbPayOrder
(
pushData
,
req
)
{
//处理公司宝推送的订单信息
try
{
var
signResult
=
await
this
.
createSign
(
pushData
,
"
6B876EB84731E166D76E1F73AD5764BA
"
,
true
);
var
signResult
=
await
this
.
createSign
(
pushData
,
"
a7bbb13627cd11ea98c800163e06da98
"
,
true
);
if
(
signResult
.
status
!=
0
)
{
return
signResult
;
}
if
(
signResult
.
data
!=
pushData
.
token
.
toUpperCase
())
{
if
(
!
pushData
.
sign
)
{
return
system
.
getResult
(
null
,
"sign is empty"
);
}
if
(
signResult
.
data
!=
pushData
.
sign
.
toUpperCase
())
{
return
system
.
getResult
(
null
,
"签名错误"
);
}
var
tokenInfo
=
await
this
.
getToken
(
pushData
.
actionProcess
);
if
(
tokenInfo
.
status
!=
0
)
{
return
tokenInfo
;
}
var
param
=
{};
if
(
pushData
.
skuId
==
"FW_GOODS-582064-1"
)
{
param
=
{
actionProcess
:
pushData
.
actionProcess
,
actionType
:
"updateOrderPayStatus"
,
actionBody
:
{
channelUserId
:
pushData
.
jdPin
,
payStatus
:
"yfk"
,
channelItemCode
:
pushData
.
serviceCode
,
needNoOrderNo
:
pushData
.
orderId
,
buyerMoblie
:
pushData
.
mobile
},
isUser
:
"yes"
};
}
//自助注册产品
else
{
//有返回用户信息进行用户ID加密
param
=
{
actionProcess
:
pushData
.
actionProcess
,
actionType
:
"addOrderAndDelivery"
,
actionBody
:
{
channelUserId
:
pushData
.
jdPin
,
needNo
:
pushData
.
skuId
+
"_"
+
pushData
.
orderId
,
needNoOrderNo
:
pushData
.
orderId
,
buyerMoblie
:
pushData
.
mobile
},
isUser
:
"yes"
};
}
//商标注册【专家辅助申请】、商标注册【担保申请】和 除商标之外的产品
var
param
=
{
actionProcess
:
pushData
.
actionProcess
,
actionType
:
"updateOrderPayStatus"
,
actionBody
:
{
channelUserId
:
pushData
.
user_phone
+
"_"
+
pushData
.
user_id
,
payStatus
:
"yfk"
,
needNo
:
"zzsbzc_"
+
pushData
.
order_no
,
needNoOrderNo
:
pushData
.
order_no
,
//---用此字段查找
buyerMoblie
:
pushData
.
mobile
},
isUser
:
"yes"
};
var
reqUrl
=
this
.
channelApiUrl
+
"/action/tmOrder/springBoard"
;
var
resultUser
=
await
this
.
execClient
.
execPostTK
(
param
,
reqUrl
,
tokenInfo
.
data
.
token
);
if
(
!
resultUser
)
{
...
...
igirl-channel-web/app/base/utils/smsClient.js
View file @
d8ec4b52
const
system
=
require
(
"../system"
);
class
SmsClient
{
constructor
(){
this
.
smsTeml
=
"http://123.
57.15
6.109:4103/api/Send"
;
this
.
smsTeml
=
"http://123.
67.18
6.109:4103/api/Send"
;
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
}
async
sendMsg
(
to
,
content
){
...
...
igirl-channel-web/app/config/routes/web.js
View file @
d8ec4b52
...
...
@@ -8,6 +8,7 @@ const jwt = require('jsonwebtoken');
const
secret
=
'3rZ3aNfGAyQAB4sE'
;
//自定义
module
.
exports
=
function
(
app
)
{
app
.
get
(
"/admin"
,
async
function
(
req
,
res
)
{
console
.
log
(
"jd==================================admin=============================================================================================="
);
res
.
redirect
(
"https://oauth2.jdcloud.com/authorize?response_type=token&redirect_uri=https://tm.plus.jdcloud.com/jdtm/getUser&state=OAjdlist&client_id=9491577327154697"
);
return
;
...
...
@@ -204,31 +205,29 @@ 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
=
"
jd
"
;
var
result
=
await
tmqueryCtl
.
push
Jd
PayOrder
(
req
.
query
,
req
);
logClient
.
payLog
(
"jd"
,
{
optitle
:
"###操作订单结果...orderNotify"
,
op
:
"/jd/orderNotify"
,
content
:
"result="
+
JSON
.
stringify
(
result
),
clientIp
:
""
});
//
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
.
push
Gsb
PayOrder
(
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
;
}
var
params
=
{
instanceId
:
req
.
query
.
orderBizId
,
appInfo
:
{
authUrl
:
"https://tm.plus.jdcloud.com/jd/skipPage?channelUserId="
+
req
.
query
.
jdPin
,
adminUrl
:
"https://tm.plus.jdcloud.com"
}
order_no
:
req
.
query
.
order_no
,
success
:
true
,
auth_url
:
"https://zcchannelweb.gongsibao.com/gsbhome?state=jdindentlist"
};
res
.
end
(
JSON
.
stringify
(
params
));
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