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

credit fix

parent 838d8d50
...@@ -732,22 +732,22 @@ class CallriskService extends Service { ...@@ -732,22 +732,22 @@ class CallriskService extends Service {
const call_behavior = yys_report_data.data.call_behavior_analysis; const call_behavior = yys_report_data.data.call_behavior_analysis;
const call_behavior_report = { const call_behavior_report = {
report_id, report_id,
// active_call_count: call_behavior.active_call_count, active_call_count: call_behavior.active_call_number_count,
// passive_call_count: call_behavior.passive_call_count, passive_call_count: call_behavior.passive_call_number_count,
// each_call_count: call_behavior.each_call_count, each_call_count: call_behavior.mutual_call_number_count,
silence_count_3day: call_behavior.silence_count_3day, silence_count_3day: call_behavior.silence_count_3day,
silence_time_3day: call_behavior.silence_time_3day, silence_time_3day: call_behavior.silence_time_3day,
silence_time_rate_3day: call_behavior.silence_time_rate_3day, silence_time_rate_3day: call_behavior.silence_time_rate_3day,
maximum_active_call_count: call_behavior.maximum_active_call_count, maximum_active_call_count: call_behavior.maximum_active_call_count,
maximum_active_call_number: call_behavior.maximum_active_call_number, maximum_active_call_number: call_behavior.maximum_active_call_number,
// maximum_active_call_city: call_behavior.maximum_active_call_city, maximum_active_call_city: call_behavior.maximum_active_call_location,
maximum_passive_call_count: call_behavior.maximum_passive_call_count, maximum_passive_call_count: call_behavior.maximum_passive_call_count,
maximum_passive_call_number: call_behavior.maximum_passive_call_number, maximum_passive_call_number: call_behavior.maximum_passive_call_number,
// maximum_passive_call_city: call_behavior.maximum_passive_call_city, maximum_passive_call_city: call_behavior.maximum_passive_call_location,
maximum_call_time: call_behavior.maximum_call_time, maximum_call_time: call_behavior.maximum_call_time,
maximum_call_time_number: call_behavior.maximum_call_time_number, maximum_call_time_number: call_behavior.maximum_call_time_number,
// maximum_call_time_city: call_behavior.maximum_call_time_city, maximum_call_time_city: call_behavior.maximum_call_time_location,
} }
const call_behavior_id = await ctx.prometheusModel.CreditCallriskCallBehavior.add(call_behavior_report); const call_behavior_id = await ctx.prometheusModel.CreditCallriskCallBehavior.add(call_behavior_report);
......
...@@ -122,12 +122,14 @@ class OrderService extends Service { ...@@ -122,12 +122,14 @@ class OrderService extends Service {
const slag = TypeConfigFlip[type]; const slag = TypeConfigFlip[type];
const preferential = await ctx.service.credit.preferential.getPreferential(slag); const preferential = await ctx.service.credit.preferential.getPreferential(slag);
let preferential_price = 0; let preferential_price = 0;
let preferential_id = 0;
if (preferential && preferential.id) { if (preferential && preferential.id) {
preferential_price = preferential.price; preferential_price = preferential.price;
preferential_id = preferential.id;
} }
const price = (order.price - preferential_price).toFixed(2); const price = (order.price - preferential_price).toFixed(2);
await ctx.prometheusModel.CreditOrder.update({ final_price: price, preferential_price, preferential_id: preferential.id }, { where: { id, pay_status: 0 } }); await ctx.prometheusModel.CreditOrder.update({ final_price: price, preferential_price, preferential_id: preferential_id }, { where: { id, pay_status: 0 } });
return price; return price;
......
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