Commit a662bbca by 孙亚楠

d

parent b5342137
......@@ -160,6 +160,7 @@ class BpoSDPJApi {
let _no = await this.setNo(_cCashInfo.id.toString());
_no = encodeURIComponent(_no);
let custormUrl = `https://bpohhr.gongsibao.com/sdpj?no=${_no}&outTradeNo=${_cCashInfo.outTradeNo}&mchtId=${_cCashInfo.mchtId}`;
console.log("----------------->"+custormUrl);
// 生成二维码
let url = await this.qrClient.generateQR(custormUrl);
_cCashInfo.qrcode = url;
......@@ -334,7 +335,7 @@ class BpoSDPJApi {
let cashUser = await this.ccashuserSve.findOne({
openId: obj.openId
});
}) || {};
let doAuthRes = await this.doAuth({
id_name: this.trim(obj.id_name),
......@@ -406,7 +407,7 @@ class BpoSDPJApi {
});
await this.redisLock.lock(key, _lock, 20);
let result = await this.cashOut(ccashinfo, api);
let result = await this.cashOut(ccashinfo,api, cashUser);
return result;
} catch (e) {
console.log(e);
......@@ -460,7 +461,7 @@ class BpoSDPJApi {
}
}
async cashOut(cashInfo, api) {
async cashOut(cashInfo, api,cashUser) {
if (cashInfo.qrcode_status != 1) {
// 1 认证页面 2 二维码已失效 3 红包领取页面 4 红包领取结果页面(心跳查询) 5 红包已被领取
return this.getCodeResult(0, {redirect_code : 2});
......@@ -475,12 +476,12 @@ class BpoSDPJApi {
bizContent.push({
"note": "提现",
"idType": "00",
"idName": cashInfo.id_name,
"idName": cashUser.id_name,
"seqNo": "1000",
"accNo": cashInfo.openId,
"accNo": cashUser.openId,
"amt": cashInfo.amt,
"accType": "02",
"idNo": cashInfo.id_no
"idNo": cashUser.id_no
});
let nonceStr = await this.getUidStr(32, 36);
let tradeTime = moment().format('YYYYMMDDHHmmss');
......@@ -517,6 +518,8 @@ class BpoSDPJApi {
url: settings.apiconfig.payDomain() + "/merchant/order/transfer",
data: param,
});
console.log(rs.data);
if (rs.data.code === 0) {
cashInfo.trade_status = "01";
cashInfo.trade_desc = "提现申请成功";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment