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
5e07bf8e
Commit
5e07bf8e
authored
Nov 04, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
68541249
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
+13
-1
bpo-web/app/base/api/impl/bpoSDPJApi.js
+13
-1
No files found.
bpo-web/app/base/api/impl/bpoSDPJApi.js
View file @
5e07bf8e
...
...
@@ -98,6 +98,8 @@ class BpoSDPJApi {
* @returns {Promise<{msg: string, code: number}>}
*/
async
cashQRCode
(
obj
,
req
)
{
let
t1
=
new
Date
().
getTime
();
console
.
log
(
`cashQRCode-----
${
obj
.
outTradeNo
}
-----begin--
${
t1
}
`
);
// 检验所有参数是否完整 如果出现非法参数直接返回
if
(
!
obj
.
appId
)
{
return
this
.
getBaseResult
(
1002001
,
"appId不存在"
);
...
...
@@ -129,6 +131,8 @@ class BpoSDPJApi {
etemplate_id
:
obj
.
ecid
,
mchtId
:
obj
.
mchtId
,
});
let
t2
=
new
Date
().
getTime
();
console
.
log
(
`cashQRCode-----
${
obj
.
outTradeNo
}
-----ecompanybusiSve.findOne---
${
t2
-
t1
}
`
);
if
(
!
api
)
{
return
this
.
getBaseResult
(
1001003
,
"配置信息错误,请联系薪必果人员进行配置"
);
}
...
...
@@ -146,6 +150,9 @@ class BpoSDPJApi {
notifyUrl
:
obj
.
notifyUrl
,
};
let
sign
=
system
.
getSign
(
param
,
api
.
key
,
this
.
EXCEPT_KEYS
);
let
t3
=
new
Date
().
getTime
();
console
.
log
(
`cashQRCode-----
${
obj
.
outTradeNo
}
-----system.getSign---
${
t3
-
t2
}
`
);
if
(
sign
!=
obj
.
sign
)
{
return
this
.
getBaseResult
(
1001001
,
"签名失败"
);
}
...
...
@@ -157,7 +164,8 @@ class BpoSDPJApi {
mchtId
:
obj
.
mchtId
,
outTradeNo
:
obj
.
outTradeNo
,
})
||
{};
let
t4
=
new
Date
().
getTime
();
console
.
log
(
`cashQRCode-----
${
obj
.
outTradeNo
}
-----ccashinfoSve.findOne--
${
t4
-
t3
}
`
);
console
.
log
(
`bpoSDPJApi.js -> cashQRCode -> mchtId & ecid 进行联合查询 :参数=`
+
JSON
.
stringify
(
obj
)
+
" _cCashInfo = "
+
JSON
.
stringify
(
_cCashInfo
));
//如果二维码有效直接返回
if
(
_cCashInfo
.
qrcode_status
==
1
&&
_cCashInfo
.
qrcode
)
{
...
...
@@ -177,6 +185,8 @@ class BpoSDPJApi {
// 保存签约数据
_cCashInfo
=
await
this
.
ccashinfoSve
.
create
(
_cCashInfo
);
}
let
t5
=
new
Date
().
getTime
();
console
.
log
(
`cashQRCode-----
${
obj
.
outTradeNo
}
-----ccashinfoSve.create---
${
t5
-
t4
}
`
);
// 拼接h5 http连接 http//xxx?mchtId=xxx&ecid=xxx&no=id
let
_no
=
await
this
.
setNo
(
_cCashInfo
.
id
.
toString
());
...
...
@@ -189,6 +199,8 @@ class BpoSDPJApi {
_cCashInfo
.
qrcode_status
=
1
;
_cCashInfo
.
sign_url
=
custormUrl
;
_cCashInfo
.
save
();
let
t6
=
new
Date
().
getTime
();
console
.
log
(
`cashQRCode-----
${
obj
.
outTradeNo
}
-----qrClient.generateQR---
${
t6
-
t5
}
`
);
return
this
.
getCodeResult
(
0
,
{
"qrcode"
:
url
||
""
});
}
catch
(
e
)
{
let
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