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