Commit 1b749b1c authored by 李尚科's avatar 李尚科

fix

parent 06c60cc4
Pipeline #14153 passed with stage
in 5 seconds
...@@ -26,7 +26,7 @@ class OrderService extends Service { ...@@ -26,7 +26,7 @@ class OrderService extends Service {
const type = TypeConfig[order_type]; const type = TypeConfig[order_type];
// const where = { user_id }; // const where = { user_id };
const order_records = await ctx.prometheusModel.CreditOrder.all({ where: { user_id, type, valid: 1 } }); const order_records = await ctx.prometheusModel.CreditOrder.all({ where: { user_id, type, valid: 1, order: [['order_time', 'desc']] } });
const worth_h = []; const worth_h = [];
const worth_l = []; const worth_l = [];
...@@ -42,12 +42,12 @@ class OrderService extends Service { ...@@ -42,12 +42,12 @@ class OrderService extends Service {
order_no: order.order_no, order_no: order.order_no,
report_id: order.report_id, report_id: order.report_id,
type: order_type, type: order_type,
created_time: moment(order.created_at).format('YYYY-MM-DD HH:mm'), created_time: moment(order.order_time).format('YYYY-MM-DD HH:mm'),
phone: order.phone.replace(order.phone.substring(3, 7), "****"), phone: order.phone.replace(order.phone.substring(3, 7), "****"),
state: order.state, state: order.state,
state_text: order.state === '已支付' ? '' : order.state, state_text: order.state === '已支付' ? '' : order.state,
}; };
if (is_expire) { if (!is_expire) {
worth_h.push(item); worth_h.push(item);
} else { } else {
worth_l.push(item); worth_l.push(item);
...@@ -133,7 +133,7 @@ class OrderService extends Service { ...@@ -133,7 +133,7 @@ class OrderService extends Service {
} }
//检查订单报告是否 还在规定的时间内 是否具有高价值 0:高价值 1:低价值-生成时间过长- //检查订单报告是否 还在规定的时间内 是否具有高价值 0:高价值 ; 1:低价值-生成时间过长-
async checkOrderExpire(order) { async checkOrderExpire(order) {
const { ctx } = this; const { ctx } = this;
......
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