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
03793972
Commit
03793972
authored
Oct 23, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'center-channel' of gitlab.gongsibao.com:jiangyong/zhichan into center-channel
parents
e88275e8
5fe7af1d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
8 deletions
+108
-8
center-channel/app/base/service/impl/common/centerorderSve.js
+1
-1
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
+4
-1
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+101
-4
center-channel/app/config/routes/api.js
+2
-2
No files found.
center-channel/app/base/service/impl/common/centerorderSve.js
View file @
03793972
...
...
@@ -581,7 +581,7 @@ class CenterorderService extends AppServiceBase {
}
pobj
.
actionBody
.
channelSolutionNo
=
pobj
.
actionBody
.
bizId
;
pobj
.
actionType
=
"receiveSolutionPayInfo"
;
pobj
.
actionType
=
"receiveSolutionPayInfo
New
"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/icapi/springBoard"
;
var
solutionrtn
=
await
this
.
execClient
.
execPost
(
pobj
,
url
);
if
(
!
solutionrtn
||
!
solutionrtn
.
stdout
)
{
...
...
center-channel/app/base/service/impl/utilsSve/utilsNeedSve.js
View file @
03793972
...
...
@@ -1394,6 +1394,9 @@ class UtilsNeedService extends AppServiceBase {
async
icpNotifyNew
(
pobj
)
{
var
actionBody
=
pobj
.
actionBody
;
var
self
=
this
;
if
(
actionBody
.
isDirectBuy
&&
actionBody
.
isDirectBuy
==
1
){
actionBody
.
bizId
=
actionBody
.
orderNo
}
if
(
!
actionBody
.
bizId
)
{
return
system
.
getResult
(
null
,
"actionBody.bizId can not be empty,100495"
);
}
...
...
@@ -1401,7 +1404,7 @@ class UtilsNeedService extends AppServiceBase {
if
(
!
actionBody
.
status
)
{
return
system
.
getResult
(
null
,
"actionBody.status can not be empty,100495"
);
}
pobj
.
actionType
=
"receive
Icp
StatusNotify"
;
pobj
.
actionType
=
"receive
Order
StatusNotify"
;
var
url
=
settings
.
centerOrderUrl
()
+
"action/qcapi/springBoard"
;
var
rtn
=
await
this
.
restPostUrl
(
pobj
,
url
);
if
(
actionBody
.
status
==
2
)
{
...
...
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
03793972
...
...
@@ -80,9 +80,11 @@ class UtilsOrderService extends AppServiceBase {
return
productItemResult
;
}
pobj
.
actionBody
.
product_info
=
productItemResult
.
data
;
var
verifyResult
=
await
this
.
isOrderVerify
(
pobj
,
pobj
.
actionBody
);
if
(
verifyResult
.
status
!=
0
)
{
return
verifyResult
;
if
(
pobj
.
appInfo
.
app_code
!=
"zc360"
){
var
verifyResult
=
await
this
.
isOrderVerify
(
pobj
,
pobj
.
actionBody
);
if
(
verifyResult
.
status
!=
0
)
{
return
verifyResult
;
}
}
pobj
.
actionType
=
"getProductInterface"
;
pobj
.
actionBody
.
product_id
=
pobj
.
actionBody
.
product_info
.
id
;
...
...
@@ -951,7 +953,102 @@ class UtilsOrderService extends AppServiceBase {
opOrderResult
.
data
=
null
;
return
opOrderResult
;
}
catch
(
e
)
{
await
this
.
cacheManager
[
"TlPayLocker"
].
release
(
params
.
orderNo
);
// await this.cacheManager["TlPayLocker"].release(params.orderNo);
this
.
logCtl
.
error
({
optitle
:
"回调处理订单---error异常"
,
op
:
"center-app/app/base/service/impl/utilsSve/utilsOrderSve.js/channelPayNotify"
,
content
:
"参数="
+
JSON
.
stringify
(
params
)
+
",error:"
+
e
.
stack
,
clientIp
:
client_ip
||
""
});
return
system
.
getResultFail
(
-
200
,
e
.
stack
);
}
}
async
channelPayNotify360
(
params
,
client_ip
)
{
//渠道订单支付通知
try
{
this
.
logCtl
.
info
({
optitle
:
(
new
Date
()).
Format
(
"yyyy-MM-dd hh:mm:ss"
)
+
"渠道订单支付回调参数信息"
,
op
:
"service/impl/utilsSve/utilsOrderSve.js/channelPayNotify"
,
content
:
JSON
.
stringify
(
params
),
clientIp
:
client_ip
||
""
});
if
(
!
params
.
appkey
)
{
return
system
.
getResult
(
null
,
'appKey can be not null'
)
}
if
(
!
params
.
orderNo
)
{
return
system
.
getResult
(
null
,
'orderNo can be not null'
)
}
if
(
!
params
.
payTotalSum
)
{
return
system
.
getResult
(
null
,
'payTotalSum can be not null'
)
}
if
(
!
params
.
signature
)
{
return
system
.
getResult
(
null
,
'signature can be not null'
)
}
if
(
!
params
.
payType
)
{
return
system
.
getResult
(
null
,
'payType can be not null'
)
}
if
(
!
params
.
payOrderNo
)
{
return
system
.
getResult
(
null
,
'payOrderNo can be not null'
)
}
let
url
=
this
.
centerAppUrl
+
'payment/paymentApi/getAppInfoByAppKey'
;
let
appInfoRt
=
await
this
.
restPostUrl
({
appKey
:
params
.
appkey
},
url
);
if
(
appInfoRt
.
status
!=
0
)
{
appInfoRt
.
msg
=
appInfoRt
.
msg
+
",100270"
;
return
appInfoRt
;
}
let
singStr
=
params
.
appkey
+
params
.
orderNo
+
params
.
payTotalSum
+
appInfoRt
.
data
.
uapp_secret
let
sign
=
md5
(
singStr
).
toUpperCase
();
if
(
sign
!=
params
.
signature
)
{
return
system
.
getResultFail
(
-
1
,
'验证签名失败'
)
}
var
appInfo
=
appInfoRt
.
data
;
params
.
appInfo
=
{
uapp_id
:
appInfo
.
uapp_id
};
params
.
pay_type
=
params
.
payType
;
params
.
time_end
=
params
.
payTime
;
//修改并返回订单支付状态,创建收款单
// 这里修改了order_info的状态(status/paytime等)
var
orderUrl
=
this
.
centerOrderUrl
+
"opaction/opPayOrder/receivePayCallBackNotifyByChannel"
;
var
opOrderResult
=
await
this
.
restPostUrl
(
params
,
orderUrl
);
if
(
opOrderResult
.
status
!=
0
)
{
opOrderResult
.
data
=
null
;
return
opOrderResult
;
}
if
(
!
opOrderResult
.
data
){
return
opOrderResult
;
}
opOrderResult
.
data
.
appInfo
=
{
uapp_id
:
appInfo
.
uapp_id
,
uapp_key
:
appInfo
.
uapp_key
,
app_code
:
appInfo
.
app_code
,
app_name
:
appInfo
.
app_name
};
opOrderResult
.
data
.
userInfo
=
{
channel_userid
:
opOrderResult
.
data
.
order_info
.
channelUserId
,
channel_username
:
opOrderResult
.
data
.
order_info
.
channelUserId
,
channel_nickname
:
opOrderResult
.
data
.
order_info
.
channelUserId
};
opOrderResult
.
data
.
orderNo
=
params
.
orderNo
;
opOrderResult
.
data
.
order_info
.
pay_flow_no
=
params
.
trade_no
||
""
;
// 2020 0704 lin 新增 推送fq必填字段
opOrderResult
.
data
.
order_info
.
pay_channel
=
params
.
payType
||
""
;
//付款方式
opOrderResult
.
data
.
order_info
.
pay_time
=
params
.
payTime
;
//付款时间
opOrderResult
.
data
.
order_info
.
pay_payer_bank_no
=
params
.
buyer_email
||
""
;
//付款账号
opOrderResult
.
data
.
order_contact
=
opOrderResult
.
data
.
delivery_content
.
orderContact
;
var
pobj
=
{
appInfo
:
opOrderResult
.
data
.
appInfo
,
actionBody
:
opOrderResult
.
data
}
// 推送
this
.
utilsPushSve
.
pushBusInfo
(
pobj
,
"pushOrder"
,
0
);
if
([
'icpsq'
,
'edisq'
].
includes
(
opOrderResult
.
data
.
product_info
.
channel_item_code
)){
this
.
utilsPushSve
.
aliBusiness2Delivery
(
pobj
,
"pushDeliveryOrder"
);
}
opOrderResult
.
data
=
null
;
return
opOrderResult
;
}
catch
(
e
)
{
// await this.cacheManager["TlPayLocker"].release(params.orderNo);
this
.
logCtl
.
error
({
optitle
:
"回调处理订单---error异常"
,
op
:
"center-app/app/base/service/impl/utilsSve/utilsOrderSve.js/channelPayNotify"
,
...
...
center-channel/app/config/routes/api.js
View file @
03793972
...
...
@@ -282,7 +282,7 @@ module.exports = function (app) {
"needBatchUpload"
,
"serviceSubmitOption"
,
"submitWangwenSolution"
,
"closeNeed"
,
"recordLog"
,
"recordLogList"
,
"foodServiceSubmitOption"
,
"submitFoodSolution"
,
"foodCloseNeed"
,
"foodRecordLog"
,
"foodRecordLogList"
,
"getParamsFor360"
,
"addOrderWeb"
,
"getPayRecords"
,
"getParamsFor360"
,
"addOrderWeb"
,
"getPayRecords"
,
"icpNotifyNew"
,
];
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
...
...
@@ -407,7 +407,7 @@ module.exports = function (app) {
req
.
body
.
appInfo
=
result
.
data
;
req
.
body
.
actionProcess
=
result
.
data
.
app_code
;
var
lst
=
[
"submitNeed"
,
"paySuccess"
,
"icpNotify"
"submitNeed"
,
"paySuccess"
,
"icpNotify"
,
"icpNotifyNew"
];
if
(
lst
.
indexOf
(
req
.
body
.
actionType
)
>=
0
)
{
var
userpin
=
req
.
headers
[
"userpin"
]
||
""
;
...
...
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