|
@@ -156,7 +156,7 @@ class UnicomComboTaskView(View):
|
|
|
# 停用
|
|
|
unicom_api.change_device_to_disable(iccid)
|
|
|
asy = threading.Thread(target=UnicomComboTaskView.async_combo_sys_msg_push,
|
|
|
- args=(iccid, '', 0))
|
|
|
+ args=(iccid, '', 0, flow_total, flow_total))
|
|
|
asy.start()
|
|
|
|
|
|
return response.json(0)
|
|
@@ -292,9 +292,11 @@ class UnicomComboTaskView(View):
|
|
|
return response.json(0)
|
|
|
|
|
|
@staticmethod
|
|
|
- def async_combo_sys_msg_push(iccid, combo_order_id, push_type):
|
|
|
+ def async_combo_sys_msg_push(iccid, combo_order_id, push_type, total_flow=0.00, usage_flow=0.00):
|
|
|
"""
|
|
|
异步保存消息推送 激活|过期
|
|
|
+ @param usage_flow:
|
|
|
+ @param total_flow:
|
|
|
@param iccid:
|
|
|
@param combo_order_id:
|
|
|
@param push_type:
|
|
@@ -306,7 +308,9 @@ class UnicomComboTaskView(View):
|
|
|
push_data = {'combo_order_id': str(combo_order_id), 'serial_no': ud_info_qs.first()['serial_no'],
|
|
|
'status': 0, 'type': push_type,
|
|
|
'updated_time': now_time,
|
|
|
- 'created_time': now_time, 'user_id': ud_info_qs.first()['user_id']}
|
|
|
+ 'created_time': now_time, 'user_id': ud_info_qs.first()['user_id'],
|
|
|
+ 'flow_total_usage': usage_flow,
|
|
|
+ 'flow_total': total_flow}
|
|
|
UnicomFlowPush.objects.create(**push_data)
|
|
|
except Exception as e:
|
|
|
logger.info('-->出错了~,errLine:{}, errMsg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|