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
c4ed4688
Commit
c4ed4688
authored
Jul 28, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
63e5bcfd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
38 deletions
+30
-38
bpo-web/app/base/api/impl/bpoSDPJApi.js
+30
-38
No files found.
bpo-web/app/base/api/impl/bpoSDPJApi.js
View file @
c4ed4688
...
@@ -184,8 +184,8 @@ class BpoSDPJApi {
...
@@ -184,8 +184,8 @@ class BpoSDPJApi {
return
this
.
getCodeResult
(
0
,{
return
this
.
getCodeResult
(
0
,{
id_name
:
_cCashInfo
.
id_name
,
id_name
:
_cCashInfo
.
id_name
,
id_no
:
_cCashInfo
.
id_no
,
id_no
:
_cCashInfo
.
id_no
,
app_id
:
_cCashInfo
.
app_id
,
//
app_id: _cCashInfo.app_id,
id
:
_cCashInfo
.
id
no
:
this
.
setNo
(
_cCashInfo
.
id
)
})
})
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
...
@@ -203,17 +203,12 @@ class BpoSDPJApi {
...
@@ -203,17 +203,12 @@ class BpoSDPJApi {
* @returns {Promise<void>}
* @returns {Promise<void>}
*/
*/
async
authentication
(
obj
,
req
){
async
authentication
(
obj
,
req
){
if
(
!
obj
||
!
obj
.
id_name
||
!
obj
.
id_no
||
!
obj
.
mchtId
||
!
obj
.
app_id
||
!
obj
.
id
){
if
(
!
obj
||
!
obj
.
id_name
||
!
obj
.
id_no
||
!
obj
.
no
){
return
this
.
getCodeResult
(
1002001
,
null
);
return
this
.
getCodeResult
(
1002001
,
null
);
}
}
try
{
try
{
let
ccashinfo
=
await
this
.
ccashinfoSve
.
getBean
({
let
ccashinfo
=
await
this
.
dao
.
findOne
({
id
:
this
.
getNo
(
obj
.
no
)
where
:{
id
:
obj
.
id
,
mchtId
:
obj
.
mchId
,
outTradeNo
:
obj
.
outTradeNo
}
});
});
if
(
!
ccashinfo
){
if
(
!
ccashinfo
){
this
.
getErrResult
(
"信息不存在"
);
this
.
getErrResult
(
"信息不存在"
);
...
@@ -239,7 +234,6 @@ class BpoSDPJApi {
...
@@ -239,7 +234,6 @@ class BpoSDPJApi {
}
}
}
}
}
}
/**
/**
* TODO:需要线上测试
* TODO:需要线上测试
*/
*/
...
@@ -247,12 +241,12 @@ class BpoSDPJApi {
...
@@ -247,12 +241,12 @@ class BpoSDPJApi {
if
(
doAuthRes
.
status
!==
0
)
{
if
(
doAuthRes
.
status
!==
0
)
{
return
this
.
getBaseResult
(
1
,
doAuthRes
.
msg
||
"姓名或身份证错误"
);
return
this
.
getBaseResult
(
1
,
doAuthRes
.
msg
||
"姓名或身份证错误"
);
}
}
ccashinfo
.
id_name
=
this
.
trim
(
obj
.
id_name
);
ccashinfo
.
id_no
=
this
.
trim
(
obj
.
id_no
);
await
ccashinfo
.
save
();
console
.
log
(
"调用二要素 (兰伯望) 接口返回:"
+
JSON
.
stringify
(
doAuthRes
));
console
.
log
(
"调用二要素 (兰伯望) 接口返回:"
+
JSON
.
stringify
(
doAuthRes
));
this
.
doSign3
(
ccashinfo
);
this
.
doSign3
(
ccashinfo
);
return
this
.
getBaseResult
(
0
,
msg
=
"认证成功"
,
data
=
{
no
:
this
.
setNo
(
ccashinfo
.
id
),
amt
:
system
.
f2y
(
ccashinfo
.
amt
),
mchtId
:
ccashinfo
.
mchtId
});
//异步推送信息
pushAsync
(
obj
);
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
);
console
.
log
(
e
);
let
result
=
{
let
result
=
{
...
@@ -262,35 +256,33 @@ class BpoSDPJApi {
...
@@ -262,35 +256,33 @@ class BpoSDPJApi {
console
.
log
(
e
.
stack
);
console
.
log
(
e
.
stack
);
return
result
;
return
result
;
}
}
}
/**
* fn:异步同送信息
* @param params
*/
pushAsync
(
params
){
/**
* fn:签约
*/
let
res
=
this
.
tdevApi
.
doSign3
(
params
);
/**
* fn:更新验证信息 人名 身份证号
*/
this
.
ccashinfoSve
.
update
(
params
);
}
}
/**
/**
* fn:打开红包
* fn:打开红包
* @param obj
* @param obj
*/
*/
openRedEnvelopes
(
obj
){
async
openRedEnvelopes
(
obj
){
if
(
!
obj
.
no
){
return
this
.
getBaseResult
(
1
,
'ID不能为空'
);
}
try
{
let
ccashinfo
=
await
this
.
ccashinfoSve
.
getBean
({
id
:
this
.
getNo
(
obj
.
no
)
});
if
(
!
ccashinfo
){
this
.
getErrResult
(
"信息不存在"
);
}
return
await
this
.
cashOut
(
ccashinfo
);
}
catch
(
e
)
{
console
.
log
(
e
);
let
result
=
{
code
:
500
,
msg
:
"接口异常"
};
console
.
log
(
e
.
stack
);
return
result
;
}
}
}
...
...
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