|
@@ -195,7 +195,7 @@ class WXTechController(View):
|
|
|
return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
|
|
|
@classmethod
|
|
|
- def created_order(cls, serial_no, user_id, trade_no, combo_id=None, pay_type=10):
|
|
|
+ def created_order(cls, serial_no, user_id, trade_no, combo_id=None, pay_type=10, order_type=3):
|
|
|
"""
|
|
|
创建系统订单
|
|
|
"""
|
|
@@ -219,7 +219,7 @@ class WXTechController(View):
|
|
|
'userID_id': user_id, 'desc': combo_info_vo['combo_name'], 'payType': pay_type,
|
|
|
'payTime': n_time, 'price': combo_info_vo['price'], 'addTime': n_time,
|
|
|
'updTime': n_time, 'status': 1, 'currency': 'CNY',
|
|
|
- 'unify_combo_id': str(combo_info_vo['id']), 'order_type': 3,
|
|
|
+ 'unify_combo_id': str(combo_info_vo['id']), 'order_type': order_type,
|
|
|
'store_meal_name': combo_info_vo['combo_name'],
|
|
|
'trade_no': trade_no}
|
|
|
Order_Model.objects.create(**order_dict)
|
|
@@ -322,7 +322,7 @@ class WXTechController(View):
|
|
|
def exchange_unicom_package(cls, serial_number, iccid, user_id, combo_id):
|
|
|
try:
|
|
|
# 通过兑换码创建订单记录
|
|
|
- order_id = cls.created_order(serial_number, user_id, 'ansjer', combo_id, 11)
|
|
|
+ order_id = cls.created_order(serial_number, user_id, 'ansjer', combo_id, 11, 2)
|
|
|
# 根据订单信息创建流量套餐包
|
|
|
UnicomComboView.create_combo_order_info(order_id, 0, iccid, combo_id)
|
|
|
return True
|