Commit 38010abe by zhaoxiqing

Merge branch 'esign-api' of http://gitlab.gongsibao.com/jiangyong/zhichan into esign-api

parents 70551bc7 fa523fef
...@@ -9,7 +9,7 @@ class APIBase extends DocBase { ...@@ -9,7 +9,7 @@ class APIBase extends DocBase {
this.merchantSve = system.getObject("service.merchant.merchantSve"); this.merchantSve = system.getObject("service.merchant.merchantSve");
this.oplogSve = system.getObject("service.common.oplogSve"); this.oplogSve = system.getObject("service.common.oplogSve");
this.SIGN_GNAME = ['sign']; this.SIGN_GNAME = ['sign'];
this.EXCEPT_KEYS = ['sign', 'requestid']; this.EXCEPT_KEYS = ['sign', 'requestid', 'simpleFormFields'];
} }
getUUID() { getUUID() {
var uuid = uuidv4(); var uuid = uuidv4();
......
...@@ -6,7 +6,7 @@ class AuthService extends ServiceBase { ...@@ -6,7 +6,7 @@ class AuthService extends ServiceBase {
super(); super();
this.feeSve = system.getObject("service.fee.feeSve"); this.feeSve = system.getObject("service.fee.feeSve");
this.orderSve = system.getObject("service.order.orderSve"); this.orderSve = system.getObject("service.order.orderSve");
this.orderauthlogSve = system.getObject("service.order.orderauthlogSve"); this.ordersignlogSve = system.getObject("service.order.ordersignlogSve");
this.enginesignSve = system.getObject("service.engine.enginesignSve"); this.enginesignSve = system.getObject("service.engine.enginesignSve");
this.tradelogDao = system.getObject("db.common.tradelogDao"); this.tradelogDao = system.getObject("db.common.tradelogDao");
} }
...@@ -188,7 +188,7 @@ class AuthService extends ServiceBase { ...@@ -188,7 +188,7 @@ class AuthService extends ServiceBase {
return system.getResultFail(1000000, "模板ID不能为空"); return system.getResultFail(1000000, "模板ID不能为空");
} }
if (!simpleFormFields) { if (!simpleFormFields) {
return system.getResultFail(1000000, "文本域不能为空"); return system.getResultFail(1000000, "模板关联参数错误");
} }
return this.operatorSign(params, async (p) => { return this.operatorSign(params, async (p) => {
// 调用创建账户API // 调用创建账户API
...@@ -233,21 +233,22 @@ class AuthService extends ServiceBase { ...@@ -233,21 +233,22 @@ class AuthService extends ServiceBase {
} }
// 2. 调用签约引擎接口 // 2. 调用签约引擎接口
let res = await operatorMethod(params); let res = await operatorMethod(params);
let contract = res.data || {};
if (isFee) { if (isFee) {
// 生成订单 // 生成订单
// let logres = await this.orderauthlogSve.saveEorderAuthLog({ let logres = await this.ordersignlogSve.saveEorderSignLog({
// order_id: orderProduct.id, order_id: orderProduct.id,
// product_id: orderProduct.product_id, product_id: orderProduct.product_id,
// platform_name: app.name, platform_name: app.name,
// platform_id: app.id, platform_id: app.id,
// spended_num: trade.trade_amt, user_name: contract.idName, // 使用方
// user_name: params.idName, // 使用方 spended_num: trade.trade_amt,
// actual_spend_name: app.merchant_name,// 实际使用方 actual_spend_name: app.merchant_name,// 实际使用方
// engine_trade_id: trade.id, engine_contract_name: contract.name,
// pass: pass ? 1 : 0 engine_contract_id: contract.docid,
// }); engine_trade_id: trade.id,
// console.log(logres); });
console.log(logres);
} }
// 4. 返回认证结果 // 4. 返回认证结果
return system.getResultSuccess(res.data, res.msg); return system.getResultSuccess(res.data, res.msg);
...@@ -275,7 +276,7 @@ class AuthService extends ServiceBase { ...@@ -275,7 +276,7 @@ class AuthService extends ServiceBase {
account_id: orderProduct.engine_account_id, account_id: orderProduct.engine_account_id,
trade_amt: trade_amt, trade_amt: trade_amt,
trade_no: tradeLog.id, trade_no: tradeLog.id,
trade_desc: "二要素验证", trade_desc: params.desc || "",
}); });
if (tradeRes.status !== 0) { if (tradeRes.status !== 0) {
tradeLog.result = 2; tradeLog.result = 2;
......
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