Commit 5f254f75 authored by Hsinli's avatar Hsinli

Merge branch 'master' of t-git.51gjj.com:fangbin/51business

parents 43c34460 abc13e8b
Pipeline #13469 passed with stage
in 40 seconds
......@@ -10,8 +10,8 @@ class CallriskController extends Controller {
async getReport() {
const { ctx } = this;
const report_no = ctx.params.report_no;
let ret = await ctx.service.credit.callrisk.getReport(report_no);
const report_id = ctx.params.report_id;
let ret = await ctx.service.credit.callrisk.getReport(report_id);
ctx.success(ret);
}
......@@ -34,7 +34,7 @@ class CallriskController extends Controller {
//TODO 三要素校验 调用数据服务接口
......
......@@ -55,9 +55,9 @@ module.exports = app => {
},
}
}, {
timestamps: false,
tableName: 'credit_order',
});
timestamps: false,
tableName: 'credit_order',
});
return CreditOrder;
......
......@@ -11,7 +11,7 @@ module.exports = app => {
//我的信用-个人通话风险
router.get('/callrisk/report/:report_no', 'credit.callrisk.getReport');//获取报告信息
router.get('/callrisk/report/:report_id', 'credit.callrisk.getReport');//获取报告信息
router.post('/callrisk/query', 'credit.callrisk.queryCallRisk');//查询个人通话信息
......
......@@ -30,13 +30,13 @@ class CallriskService extends Service {
}
async getReport(report_no) {
async getReport(report_id) {
const { ctx } = this;
const basics = await ctx.prometheusModel.CreditCallriskReport.one({ where: { report_no } });
const basics = await ctx.prometheusModel.CreditCallriskReport.one({ where: { report_id } });
if (!basics || !basics.id) {
ctx.failed('error report_no');
ctx.failed('error report_id');
}
const report_id = basics.id;
const call_overview = await this.getCallOverview(report_id);
......
......@@ -22,19 +22,18 @@ class OrderService extends Service {
const worth_h = [];
const worth_l = [];
const worth_time = type === 1 ? 15 : 30;
const now_time = moment().format('X');
const now_time = moment().valueOf();
for (let i in order_records) {
const order = order_records[i];
const expire_time = moment(state_time).format('X') + worth_time * 86400;
const expire_time = moment(order.state_time).valueOf() + worth_time * 86400;
const apply = { phone: '15968762898', report_no: '51gjj201909050100001' };
const item = {
order_id: order.id,
order_no: order.order_no,
report_no: apply.report_no,
report_id: apply.report_id,
type: order_type,
created_time,
created_time: order.created_time,
phone: apply.phone.replace(apply.phone.substring(3, 7), "****"),
state: order.state,
state_text: order.state === '已支付' ? '' : order.state,
......@@ -47,7 +46,6 @@ class OrderService extends Service {
}
return { worth_h, worth_l }
}
/**
......@@ -79,6 +77,7 @@ class OrderService extends Service {
}
}
module.exports = OrderService;
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