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
7325211d
Commit
7325211d
authored
Aug 01, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
7038f1f7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
20 deletions
+27
-20
bpo-web/app/base/api/impl/bpoSDPJApi.js
+24
-19
bpo-web/app/base/db/models/ecompanybusi.js
+1
-0
bpo-web/app/config/settings.js
+2
-1
No files found.
bpo-web/app/base/api/impl/bpoSDPJApi.js
View file @
7325211d
...
...
@@ -34,7 +34,6 @@ class BpoSDPJApi {
this
.
ecompanybusiSve
=
system
.
getObject
(
"service.ecompanybusiSve"
);
this
.
tdevApi
=
require
(
"./tdevApi"
);
this
.
redisLock
=
system
.
getObject
(
"util.redisLock"
);
this
.
bankthreelogSve
=
system
.
getObject
(
"service.bankthreelogSve"
);
this
.
etemplateSve
=
system
.
getObject
(
"service.etemplateSve"
)
...
...
@@ -520,20 +519,21 @@ class BpoSDPJApi {
console
.
log
(
JSON
.
stringify
(
param
));
try
{
let
url
=
settings
.
apiconfig
.
payDomain
(
api
.
env
)
+
"/merchant/order/transfer"
;
console
.
log
(
"-----request smart transfer ------------"
,
url
,
param
);
let
rs
=
await
axios
({
method
:
'post'
,
url
:
settings
.
apiconfig
.
payDomain
()
+
"/merchant/order/transfer"
,
url
:
url
,
data
:
param
,
});
console
.
log
(
rs
.
data
);
console
.
log
(
"-----response smart transfer ------------"
,
rs
.
data
);
if
(
rs
.
data
.
code
===
0
)
{
cashInfo
.
trade_status
=
"01"
;
cashInfo
.
trade_desc
=
"提现申请成功"
;
try
{
// 张娇强烈要求
let
actualAmt
=
await
this
.
getActualAmt
(
cashInfo
,
api
);
cashInfo
.
actual_amt
=
actualAmt
;
let
item
=
await
this
.
getActualAmt
(
cashInfo
,
api
);
cashInfo
.
actual_amt
=
item
.
actualAmt
||
0
;
}
catch
(
eeee
)
{
console
.
log
(
eeee
);
}
...
...
@@ -557,19 +557,22 @@ class BpoSDPJApi {
let
cashInfo
=
await
this
.
ccashinfoSve
.
findById
(
id
);
// 查是否成功
let
item
=
await
this
.
esettleSve
.
findOrderItemByOutTradeNo
({
busi_id
:
cashInfo
.
mchtI
d
,
out_trade_no
:
cashInfo
.
outTradeNo
,
seq_no
:
"1000"
,
let
api
=
await
this
.
ecompanybusiSve
.
findOne
({
appId
:
cashInfo
.
app_i
d
,
etemplate_id
:
cashInfo
.
ecid
,
mchtId
:
cashInfo
.
mchtId
,
});
let
item
=
await
this
.
getActualAmt
(
cashInfo
,
api
);
cashInfo
.
actual_amt
=
item
.
actualAmt
||
0
;
console
.
log
(
"查smart ------------------"
,
id
,
item
,
new
Date
().
getTime
());
// let actualAmt = await this.getActualAmt(cashInfo, api);
// cashInfo.actual_amt = actualAmt;
// await cashInfo.save();
if
(
item
.
trade
_status
==
"00"
||
item
.
trade_status
==
"02"
||
item
.
trade_s
tatus
==
"03"
)
{
if
(
item
.
trade
Status
==
"00"
||
item
.
tradeStatus
==
"02"
||
item
.
tradeS
tatus
==
"03"
)
{
// 1 认证页面 2 二维码已失效 3 红包领取页面 4 红包领取结果页面(心跳查询) 5 红包已被领取
let
rc
=
item
.
trade
_s
tatus
==
"00"
?
4
:
6
;
let
rc
=
item
.
trade
S
tatus
==
"00"
?
4
:
6
;
return
this
.
getBaseResult
(
0
,
cashInfo
.
trade_desc
,
{
redirect_code
:
rc
,
trade_desc
:
cashInfo
.
trade_desc
,
...
...
@@ -588,10 +591,10 @@ class BpoSDPJApi {
etemplate_id
:
cashInfo
.
ecid
,
mchtId
:
cashInfo
.
mchtId
,
});
let
actualAmt
=
await
this
.
getActualAmt
(
cashInfo
,
api
);
cashInfo
.
actual_amt
=
actualAmt
;
let
item
=
await
this
.
getActualAmt
(
cashInfo
,
api
);
cashInfo
.
actual_amt
=
item
.
actualAmt
||
0
;
await
cashInfo
.
save
();
return
data
;
return
cashInfo
;
}
async
getActualAmt
(
cashInfo
,
api
)
{
...
...
@@ -605,21 +608,23 @@ class BpoSDPJApi {
"signType"
:
"MD5"
,
};
let
url
=
settings
.
apiconfig
.
payDomain
(
api
.
env
)
+
"/merchant/order/query"
;
params
.
sign
=
system
.
getSign
(
params
,
api
.
key
,
this
.
EXCEPT_KEYS
);
console
.
log
(
"-----request smart query ------------"
,
url
,
params
);
let
rs
=
await
axios
({
method
:
'post'
,
url
:
settings
.
apiconfig
.
payDomain
()
+
"/merchant/order/query"
,
url
:
url
,
data
:
params
,
});
console
.
log
(
rs
.
data
);
console
.
log
(
"-----response smart query ------------"
,
rs
.
data
);
if
(
rs
.
status
==
200
&&
rs
.
data
.
code
==
0
)
{
let
bizArr
=
(
rs
.
data
.
data
||
{}).
bizContent
||
[];
if
(
bizArr
.
length
>
0
)
{
let
item
=
bizArr
[
0
]
||
{};
return
item
.
actualAmt
||
0
;
return
item
;
}
}
return
-
1
;
return
{}
;
}
async
getUidStr
(
len
,
radix
)
{
...
...
bpo-web/app/base/db/models/ecompanybusi.js
View file @
7325211d
...
...
@@ -12,6 +12,7 @@ module.exports = (db, DataTypes) => {
postwxurl
:
DataTypes
.
STRING
(
300
),
postsignurl
:
DataTypes
.
STRING
(
300
),
app_type
:
DataTypes
.
BIGINT
,
env
:
DataTypes
.
STRING
,
},
{
paranoid
:
true
,
//假的删除
underscored
:
true
,
...
...
bpo-web/app/config/settings.js
View file @
7325211d
...
...
@@ -59,7 +59,8 @@ var settings = {
createMerchantApi
:
domain
+
"/merchant/busi/reg"
}
},
payDomain
:
function
()
{
payDomain
:
function
(
penv
)
{
penv
=
penv
||
settings
.
env
;
if
(
settings
.
env
==
"dev"
)
{
return
"http://39.106.185.66:8000"
;
}
else
{
...
...
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