Commit e48ee5d9 authored by 李尚科's avatar 李尚科

callrisk fix

parent c9ca81d5
Pipeline #14602 passed with stage
in 33 seconds
......@@ -39,7 +39,8 @@ class CallriskController extends Controller {
name: { type: 'string', required: true },
phone: { type: 'string', required: true },
id_card: { type: 'string', required: true },
password: { type: 'string', required: true }
password: { type: 'string', required: true },
net: { type: 'string', required: true },
}
ctx.validate(rule, input_params);
const result = await ctx.service.credit.apply.applyCallrisk(input_params);
......@@ -70,7 +71,7 @@ class CallriskController extends Controller {
const { ctx } = this;
const order_id = ctx.params.order_id;
const result = await ctx.service.credit.callrisk.queryTaskStatus(order_id);
ctx.success({ result });
}
......
......@@ -342,7 +342,7 @@ class ApplyService extends Service {
async applyCallrisk(input) {
const { ctx } = this;
const { name, phone, id_card, password } = input;
const { name, phone, id_card, password, net } = input;
const user_id = ctx.userId;
const app_type_id = ctx.appTypeId;
const app_user_id = ctx.appUserId;
......@@ -365,7 +365,7 @@ class ApplyService extends Service {
const order_id = order.id;
//创建yys-order apply 记录
const apply = await this.createYysApply({ name, phone, id_card, password, order_id });
const apply = await this.createYysApply({ name, phone, id_card, password, net, order_id });
const order_sn = apply.r_order_id;
//第一次调用运营商获取验证码接口
......@@ -404,10 +404,10 @@ class ApplyService extends Service {
const app_type_id = ctx.appTypeId;
const app_user_id = ctx.appUserId;
const app_id = ctx.appId;
const { name, phone, id_card, password, order_id } = input;
const { name, phone, id_card, password, net, order_id } = input;
//运营商API.创建订单号
const order_sn_info = await ctx.service.credit.yys.getOrderSn(phone);
const order_sn_info = await ctx.service.credit.yys.getOrderSn({ phone, net });
if (order_sn_info.code !== 0) {
ctx.failed('getOrderSn error msg:' + order_sn_info.msg);
}
......
......@@ -12,10 +12,11 @@ class YysService extends Service {
* 创建订单号
* @param {*}
*/
async getOrderSn(phone) {
async getOrderSn({ phone, net }) {
const { ctx } = this;
let params = {
phone: phone
phone: phone,
net: Number(net),
}
let url = this.config.NODE_BASE_URL + '/yys_api/getorderSn' + '?appKey=' + this.config.YYS_APP_KEY;
let resp = await ctx.helper.send_request(url, params, { method: 'POST', timeout: 30000 });
......
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