Commit 89e0690d authored by Hsinli's avatar Hsinli

addd

parent cf3a719c
Pipeline #13714 passed with stage
in 28 seconds
...@@ -15,9 +15,6 @@ module.exports = app => { ...@@ -15,9 +15,6 @@ module.exports = app => {
app_user_id: STRING, app_user_id: STRING,
app_id: STRING, app_id: STRING,
app_type_id: STRING, app_type_id: STRING,
name: STRING,
phone: STRING,
id_card: STRING,
service_code: STRING, service_code: STRING,
timestamp: STRING, timestamp: STRING,
appkey: STRING, appkey: STRING,
......
...@@ -196,11 +196,11 @@ class ApplyService extends Service { ...@@ -196,11 +196,11 @@ class ApplyService extends Service {
} }
//判断用户当前三要素是否是二次查询未支付订单 //判断用户当前三要素是否是二次查询未支付订单
let bePayOrderInfo = await ctx.service.credit.order.getBePayOrderByThree('blacklist', inputParams); let bePayOrder = await ctx.service.credit.order.getBePayOrderByThree('blacklist', inputParams);
if (bePayOrderInfo.have) { if (bePayOrder !== null) {
ret.second = true; ret.second = true;
ret.order_id = bePayOrderInfo.order.id; ret.order_id = bePayOrder.id;
ret.report_id = bePayOrderInfo.order.report_id; ret.report_id = bePayOrder.report_id;
return ret; return ret;
} }
...@@ -242,9 +242,6 @@ class ApplyService extends Service { ...@@ -242,9 +242,6 @@ class ApplyService extends Service {
app_user_id: ctx.appUserId, app_user_id: ctx.appUserId,
app_id: ctx.appId, app_id: ctx.appId,
app_type_id: ctx.appTypeId, app_type_id: ctx.appTypeId,
name: inputParams.name,
phone: inputParams.phone,
id_card: inputParams.id_card,
timestamp: params.signParams.timestamp, timestamp: params.signParams.timestamp,
appkey: this.config.BLACKLIST_APPLY_APPKEY, appkey: this.config.BLACKLIST_APPLY_APPKEY,
sign: params.sign, sign: params.sign,
......
...@@ -252,14 +252,11 @@ class OrderService extends Service { ...@@ -252,14 +252,11 @@ class OrderService extends Service {
/** /**
* 获得当前三要素是否有待支付的订单 * 获得当前三要素是否有待支付的订单
* @param {*} params name,phone,id_card * @param {*} type 类型blacklist/callrisk
* @param {*} threeParams 三要素
*/ */
async getBePayOrderByThree(type, threeParams) { async getBePayOrderByThree(type, threeParams) {
const { ctx } = this; const { ctx } = this;
let ret = {
have: false,
order: {}
}
if (!TypeConfig.hasOwnProperty(type)) { if (!TypeConfig.hasOwnProperty(type)) {
return ret; return ret;
} }
...@@ -267,33 +264,16 @@ class OrderService extends Service { ...@@ -267,33 +264,16 @@ class OrderService extends Service {
where: { where: {
user_id: ctx.userId, user_id: ctx.userId,
type: TypeConfig[type], type: TypeConfig[type],
name: threeParams.name,
phone: threeParams.phone,
id_card: threeParams.id_card,
state: '待支付', state: '待支付',
valid: 1, valid: 1,
state_time: { $gte: moment().subtract(1, 'days').format('YYYY-MM-DD HH:mm:ss') } state_time: { $gte: moment().subtract(1, 'days').format('YYYY-MM-DD HH:mm:ss') }
} }
} }
let list = await ctx.prometheusModel.CreditOrder.findAll(orderFilter); let order = await ctx.prometheusModel.CreditOrder.findOne(orderFilter);
if (list !== undefined) { return order;
for (let i in list) {
let filter = {
where: {
id: list[i].apply_id,
name: threeParams.name,
phone: threeParams.phone,
id_card: threeParams.id_card,
type: TypeConfig[type],
valid: 1
}
}
let applyInfo = await ctx.prometheusModel.CreditApply.findOne(filter);
if (applyInfo !== null) {
ret.have = true;
ret.order = list[i];
break;
}
}
}
return ret;
} }
//统一下单 //统一下单
......
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