Commit 227dbef5 by 王昆

Merge branch 'bpo-web' of gitlab.gongsibao.com:jiangyong/zhichan into bpo-web

parents ead4ccd3 a662bbca
...@@ -160,6 +160,7 @@ class BpoSDPJApi { ...@@ -160,6 +160,7 @@ class BpoSDPJApi {
let _no = await this.setNo(_cCashInfo.id.toString()); let _no = await this.setNo(_cCashInfo.id.toString());
_no = encodeURIComponent(_no); _no = encodeURIComponent(_no);
let custormUrl = `https://bpohhr.gongsibao.com/sdpj?no=${_no}&outTradeNo=${_cCashInfo.outTradeNo}&mchtId=${_cCashInfo.mchtId}`; 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); let url = await this.qrClient.generateQR(custormUrl);
_cCashInfo.qrcode = url; _cCashInfo.qrcode = url;
...@@ -336,7 +337,7 @@ class BpoSDPJApi { ...@@ -336,7 +337,7 @@ class BpoSDPJApi {
let cashUser = await this.ccashuserSve.findOne({ let cashUser = await this.ccashuserSve.findOne({
openId: obj.openId openId: obj.openId
}); }) || {};
let doAuthRes = await this.doAuth({ let doAuthRes = await this.doAuth({
id_name: this.trim(obj.id_name), id_name: this.trim(obj.id_name),
...@@ -408,7 +409,7 @@ class BpoSDPJApi { ...@@ -408,7 +409,7 @@ class BpoSDPJApi {
}); });
await this.redisLock.lock(key, _lock, 20); await this.redisLock.lock(key, _lock, 20);
let result = await this.cashOut(ccashinfo, api); let result = await this.cashOut(ccashinfo,api, cashUser);
return result; return result;
} catch (e) { } catch (e) {
console.log(e); console.log(e);
...@@ -462,7 +463,7 @@ class BpoSDPJApi { ...@@ -462,7 +463,7 @@ class BpoSDPJApi {
} }
} }
async cashOut(cashInfo, api) { async cashOut(cashInfo, api,cashUser) {
if (cashInfo.qrcode_status != 1) { if (cashInfo.qrcode_status != 1) {
// 1 认证页面 2 二维码已失效 3 红包领取页面 4 红包领取结果页面(心跳查询) 5 红包已被领取 // 1 认证页面 2 二维码已失效 3 红包领取页面 4 红包领取结果页面(心跳查询) 5 红包已被领取
return this.getCodeResult(0, {redirect_code : 2}); return this.getCodeResult(0, {redirect_code : 2});
...@@ -477,12 +478,12 @@ class BpoSDPJApi { ...@@ -477,12 +478,12 @@ class BpoSDPJApi {
bizContent.push({ bizContent.push({
"note": "提现", "note": "提现",
"idType": "00", "idType": "00",
"idName": cashInfo.id_name, "idName": cashUser.id_name,
"seqNo": "1000", "seqNo": "1000",
"accNo": cashInfo.openId, "accNo": cashUser.openId,
"amt": cashInfo.amt, "amt": cashInfo.amt,
"accType": "02", "accType": "02",
"idNo": cashInfo.id_no "idNo": cashUser.id_no
}); });
let nonceStr = await this.getUidStr(32, 36); let nonceStr = await this.getUidStr(32, 36);
let tradeTime = moment().format('YYYYMMDDHHmmss'); let tradeTime = moment().format('YYYYMMDDHHmmss');
...@@ -519,6 +520,8 @@ class BpoSDPJApi { ...@@ -519,6 +520,8 @@ class BpoSDPJApi {
url: settings.apiconfig.payDomain() + "/merchant/order/transfer", url: settings.apiconfig.payDomain() + "/merchant/order/transfer",
data: param, data: param,
}); });
console.log(rs.data);
if (rs.data.code === 0) { if (rs.data.code === 0) {
cashInfo.trade_status = "01"; cashInfo.trade_status = "01";
cashInfo.trade_desc = "提现申请成功"; 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