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
cd24818e
Commit
cd24818e
authored
Jul 28, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
a058ec31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
bpo-web/app/base/api/impl/bpoSDPJApi.js
+29
-3
No files found.
bpo-web/app/base/api/impl/bpoSDPJApi.js
View file @
cd24818e
...
@@ -31,6 +31,7 @@ class BpoSDPJApi {
...
@@ -31,6 +31,7 @@ class BpoSDPJApi {
this
.
esettleSve
=
system
.
getObject
(
"service.esettleSve"
);
this
.
esettleSve
=
system
.
getObject
(
"service.esettleSve"
);
this
.
tdevApi
=
require
(
"./tdevApi"
);
this
.
tdevApi
=
require
(
"./tdevApi"
);
this
.
redisLock
=
system
.
getObject
(
"util.redisLock"
);
this
.
redisLock
=
system
.
getObject
(
"util.redisLock"
);
this
.
bankthreelogSve
=
system
.
getObject
(
"service.bankthreelogSve"
);
this
.
resultMap
=
{
this
.
resultMap
=
{
0
:
"操作成功"
,
0
:
"操作成功"
,
1
:
"操作失败"
,
1
:
"操作失败"
,
...
@@ -125,6 +126,11 @@ class BpoSDPJApi {
...
@@ -125,6 +126,11 @@ class BpoSDPJApi {
let
custormUrl
=
`http://bpohhr.gongsibao.com?no=
${
_no
}
&outTradeNo=
${
_cCashInfo
.
outTradeNo
}
&mchtId=
${
_cCashInfo
.
mchtId
}
`
;
let
custormUrl
=
`http://bpohhr.gongsibao.com?no=
${
_no
}
&outTradeNo=
${
_cCashInfo
.
outTradeNo
}
&mchtId=
${
_cCashInfo
.
mchtId
}
`
;
//6.生成二维码
//6.生成二维码
let
url
=
await
this
.
qrClient
.
generateQR
(
custormUrl
);
let
url
=
await
this
.
qrClient
.
generateQR
(
custormUrl
);
_cCashInfo
.
qrcode
=
url
;
_cCashInfo
.
qrcode_status
=
1
;
_cCashInfo
.
save
();
return
this
.
getCodeResult
(
0
,{
"qrcode"
:
url
||
""
});
return
this
.
getCodeResult
(
0
,{
"qrcode"
:
url
||
""
});
}
catch
(
e
)
{
}
catch
(
e
)
{
let
result
=
{
let
result
=
{
...
@@ -185,6 +191,17 @@ class BpoSDPJApi {
...
@@ -185,6 +191,17 @@ class BpoSDPJApi {
return
this
.
getCodeResult
(
1002001
,
null
);
return
this
.
getCodeResult
(
1002001
,
null
);
}
}
try
{
try
{
let
ccashinfo
=
await
this
.
dao
.
findOne
({
where
:{
id
:
obj
.
id
,
mchtId
:
obj
.
mchId
,
outTradeNo
:
obj
.
outTradeNo
}
});
if
(
!
ccashinfo
){
this
.
getErrResult
(
"信息不存在"
);
}
if
(
!
await
this
.
idcardClient
.
checkIDCard
(
obj
.
id_no
))
{
if
(
!
await
this
.
idcardClient
.
checkIDCard
(
obj
.
id_no
))
{
return
this
.
returnjson
(
-
1
,
"身份证格式不正确"
);
return
this
.
returnjson
(
-
1
,
"身份证格式不正确"
);
}
}
...
@@ -207,7 +224,15 @@ class BpoSDPJApi {
...
@@ -207,7 +224,15 @@ class BpoSDPJApi {
}
}
}
}
let
doAuthRes
=
await
this
.
tdevApi
.
doAuth
({
idName
:
this
.
trim
(
obj
.
id_name
),
idNo
:
this
.
trim
(
obj
.
id_no
)},{
app_id
:
obj
.
app_id
});
/**
* TODO:需要线上测试
*/
let
doAuthRes
=
await
this
.
doAuth
({
id_name
:
this
.
trim
(
obj
.
id_name
),
id_no
:
this
.
trim
(
obj
.
id_no
),
app_id
:
obj
.
app_id
});
console
.
log
(
"调用二要素 (兰伯望) 接口返回:"
+
JSON
.
stringify
(
doAuthRes
));
if
(
true
){
await
this
.
doSign3
(
ccashinfo
);
}
//异步推送信息
//异步推送信息
pushAsync
(
obj
);
pushAsync
(
obj
);
...
@@ -221,7 +246,7 @@ class BpoSDPJApi {
...
@@ -221,7 +246,7 @@ class BpoSDPJApi {
console
.
log
(
e
.
stack
);
console
.
log
(
e
.
stack
);
return
result
;
return
result
;
}
}
}
}
/**
/**
...
@@ -278,7 +303,7 @@ class BpoSDPJApi {
...
@@ -278,7 +303,7 @@ class BpoSDPJApi {
let
key
=
`
${
cashInfo
.
mcthId
}
_
${
cashInfo
.
outTradeNo
}
`
;
let
key
=
`
${
cashInfo
.
mcthId
}
_
${
cashInfo
.
outTradeNo
}
`
;
let
id
=
uuidv1
();
let
id
=
uuidv1
();
await
this
.
redisLock
.
lock
(
key
,
id
,
20
);
await
this
.
redisLock
.
lock
(
key
,
id
,
20
);
let
result
=
await
this
.
econtractSve
.
autoSignBankTwo
(
param
);
let
result
=
await
this
.
econtractSve
.
autoSignBankTwo
(
param
s
);
await
this
.
redisLock
.
unLock
(
key
,
id
);
await
this
.
redisLock
.
unLock
(
key
,
id
);
return
result
;
return
result
;
}
catch
(
e
)
{
}
catch
(
e
)
{
...
@@ -384,6 +409,7 @@ class BpoSDPJApi {
...
@@ -384,6 +409,7 @@ class BpoSDPJApi {
"msg"
:
msg
,
"msg"
:
msg
,
"data"
:
data
"data"
:
data
}
}
return
res
;
}
}
}
}
module
.
exports
=
BpoSDPJApi
;
module
.
exports
=
BpoSDPJApi
;
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