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
53a526b2
Commit
53a526b2
authored
Jan 13, 2020
by
王栋源
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wdy
parent
1bf9a945
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
31 deletions
+54
-31
igirl-web/app/base/service/impl/utilstlbankSve.js
+47
-31
igirl-web/app/config/settings.js
+7
-0
No files found.
igirl-web/app/base/service/impl/utilstlbankSve.js
View file @
53a526b2
...
...
@@ -26,6 +26,7 @@ class utilsTlBankSve {
this
.
customerinfoDao
=
System
.
getObject
(
"db.customerinfoDao"
);
this
.
moneyaccountDao
=
System
.
getObject
(
"db.moneyaccountDao"
);
this
.
tlorderDao
=
System
.
getObject
(
"db.tlorderDao"
);
this
.
centerChannelUrl
=
settings
.
centerChannelUrl
();
}
...
...
@@ -349,38 +350,53 @@ class utilsTlBankSve {
result
=
"回调cusorderid参数错误,没有_标识"
;
return
result
;
}
var
tmpCompanyId
=
attachList
.
length
==
2
?
attachList
[
1
]
:
attachList
[
2
];
var
payParam
=
await
this
.
companypayparamDao
.
getOneByCompanyId
(
tmpCompanyId
,
1
);
if
(
!
payParam
)
{
result
.
return_msg
=
"回调公司没有对应的支付凭证"
;
return
jsonBuilder
.
buildObject
(
result
);
}
var
signResult
=
await
this
.
resultSign
(
parmas
,
payParam
.
pay_key
);
if
(
signResult
.
code
!=
1
)
{
result
=
signResult
.
msg
;
if
(
attachList
[
0
]
&&
attachList
[
0
].
substr
(
0
,
3
)
==
"qft"
)
{
var
p
=
{
"actionProcess"
:
"actionProcess参数不"
,
"actionType"
:
"receiveCallBackNotify"
,
"actionBody"
:
{
"parmas"
:
parmas
},
"client_ip"
:
client_ip
};
var
qftstr
=
await
this
.
restClient
.
execPost
(
p
,
this
.
centerChannelUrl
+
"web/payment/paymentApi/springBoard"
);
var
qftjson
=
JSON
.
parse
(
qftstr
.
stdout
);
if
(
qftjson
.
status
>-
1
){
result
=
"success"
}
return
result
;
}
//解析支付参数
parmas
.
out_trade_no
=
attachList
[
0
];
parmas
.
company_id
=
attachList
.
length
==
2
?
attachList
[
1
]
:
attachList
[
2
];
parmas
.
other_company_id
=
attachList
.
length
==
2
?
"0"
:
attachList
[
1
];
//操作回调
if
(
parmas
.
other_company_id
&&
Number
(
parmas
.
other_company_id
)
>
0
)
{
var
otherPayParam
=
await
this
.
companypayparamDao
.
getOneByCompanyId
(
parmas
.
other_company_id
,
1
);
if
(
!
otherPayParam
)
{
result
.
return_msg
=
"回调其他公司公司没有对应的配置信息"
;
}
else
{
var
tmpCompanyId
=
attachList
.
length
==
2
?
attachList
[
1
]
:
attachList
[
2
];
var
payParam
=
await
this
.
companypayparamDao
.
getOneByCompanyId
(
tmpCompanyId
,
1
);
if
(
!
payParam
)
{
result
.
return_msg
=
"回调公司没有对应的支付凭证"
;
return
jsonBuilder
.
buildObject
(
result
);
}
return
await
this
.
opOtherCompanyNotify
(
otherPayParam
.
notifyUrl
,
parmas
,
"通联回调"
);
}
//是别的公司则进行回调别的接口信息
else
{
var
backResult
=
await
this
.
opBackNotify
(
parmas
,
"通联回调"
);
if
(
backResult
.
code
!=
1
)
{
result
=
backResult
.
msg
;
var
signResult
=
await
this
.
resultSign
(
parmas
,
payParam
.
pay_key
);
if
(
signResult
.
code
!=
1
)
{
result
=
signResult
.
msg
;
return
result
;
}
//解析支付参数
parmas
.
out_trade_no
=
attachList
[
0
];
parmas
.
company_id
=
attachList
.
length
==
2
?
attachList
[
1
]
:
attachList
[
2
];
parmas
.
other_company_id
=
attachList
.
length
==
2
?
"0"
:
attachList
[
1
];
//操作回调
if
(
parmas
.
other_company_id
&&
Number
(
parmas
.
other_company_id
)
>
0
)
{
var
otherPayParam
=
await
this
.
companypayparamDao
.
getOneByCompanyId
(
parmas
.
other_company_id
,
1
);
if
(
!
otherPayParam
)
{
result
.
return_msg
=
"回调其他公司公司没有对应的配置信息"
;
return
jsonBuilder
.
buildObject
(
result
);
}
return
await
this
.
opOtherCompanyNotify
(
otherPayParam
.
notifyUrl
,
parmas
,
"通联回调"
);
}
//是别的公司则进行回调别的接口信息
else
{
var
backResult
=
await
this
.
opBackNotify
(
parmas
,
"通联回调"
);
if
(
backResult
.
code
!=
1
)
{
result
=
backResult
.
msg
;
return
result
;
}
return
result
;
}
return
result
;
}
}
catch
(
e
)
{
logCtl
.
error
({
...
...
@@ -445,8 +461,8 @@ class utilsTlBankSve {
throw
new
Error
(
e
.
stack
);
}
}
async
opOtherCompanyNotify
(
sveItemCode
,
orderNo
)
{
if
([
"zcdy3gy"
,
"zcdy6gy"
,
"zcdy1n"
].
indexOf
(
sveItemCode
)
>=
0
)
{
async
opOtherCompanyNotify
(
sveItemCode
,
orderNo
)
{
if
([
"zcdy3gy"
,
"zcdy6gy"
,
"zcdy1n"
].
indexOf
(
sveItemCode
)
>=
0
)
{
//TODO:操作别的公司回调
}
}
...
...
@@ -514,7 +530,7 @@ class utilsTlBankSve {
var
sqlWheres
=
{
code
:
obj
.
out_trade_no
};
var
orderItem
=
await
this
.
orderDao
.
model
.
findOne
({
where
:
sqlWheres
,
attributes
:
[
"id"
,
"code"
,
"name"
,
"sveItemCode"
,
"busPayOrderCode"
,
"totalSum"
,
"orderStatus"
,
"orderPayStatus"
,
"company_id"
,
"createuser_id"
,
"sveItemCode"
,
"sveItemName"
,
"subType"
],
attributes
:
[
"id"
,
"code"
,
"name"
,
"sveItemCode"
,
"busPayOrderCode"
,
"totalSum"
,
"orderStatus"
,
"orderPayStatus"
,
"company_id"
,
"createuser_id"
,
"sveItemCode"
,
"sveItemName"
,
"subType"
],
include
:
[
{
model
:
this
.
orderDao
.
db
.
models
.
customerinfo
,
attributes
:
[
"businessLicensePic"
,
"customerType"
,
"identityCardNo"
,
"identityCardPic"
]
}
]
...
...
@@ -525,7 +541,7 @@ class utilsTlBankSve {
return
notifyResult
;
}
//操作别的回调信息
this
.
opOtherCompanyNotify
(
orderItem
.
sveItemCode
,
obj
.
out_trade_no
);
this
.
opOtherCompanyNotify
(
orderItem
.
sveItemCode
,
obj
.
out_trade_no
);
if
(
Number
(
orderItem
.
totalSum
*
100
)
!=
Number
(
obj
.
trxamt
))
{
notifyResult
.
code
=
-
450
;
notifyResult
.
msg
=
"对应的订单支付金额不符"
;
...
...
igirl-web/app/config/settings.js
View file @
53a526b2
...
...
@@ -47,6 +47,13 @@ var settings = {
return
"http://43.247.184.94:9200/"
;
}
},
centerChannelUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
return
"http://192.168.18.34:4011/"
;
}
else
{
return
"https://center-channel/"
;
}
},
apiconfig
:
{
zxyTransferAppId
:
function
()
{
//智薪云应用id
// return "1103817785";//线上
...
...
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