Selaa lähdekoodia

优化保存支付日志

zhangdongming 1 vuosi sitten
vanhempi
commit
ed53138218
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      Controller/UnicomCombo/UnicomComboController.py

+ 4 - 2
Controller/UnicomCombo/UnicomComboController.py

@@ -627,6 +627,8 @@ class UnicomComboView(View):
 
                 params = 'lang=cn' + '&activateType=' + activate_type
                 logger.info('激活类型:{}'.format(activate_type))
+                serial_number = unicom_device_qs['serial_no']
+
                 result = {'result_code': 0, 'reason': 'success', 'error_code': 0}
                 if pay_type == 2:  # 支付宝
                     pay_price = PayService.get_two_float(price, 2)
@@ -637,7 +639,7 @@ class UnicomComboView(View):
                                                                              notify_url,
                                                                              unicom_combo_qs['remark'], response)
                     res_data = {'redirectUrl': order_dict['pay_url'], 'orderID': order_id}
-                    cls.create_order_pay_log(order_id, '购买联通4G套餐', notify_url, 'aliPay', 'SUCCESS')
+                    cls.create_order_pay_log(order_id, f'{serial_number}购买联通4G套餐', notify_url, 'aliPay', 'SUCCESS')
                 elif pay_type == 3:  # 微信支付
                     notify_url = 'unicom/wap/pay/wechat-notify'
                     ip = CommonService.get_ip_address(request)
@@ -648,7 +650,7 @@ class UnicomComboView(View):
                                                                    unicom_combo_qs['remark'],
                                                                    response)
                     result['result'] = sign_params
-                    cls.create_order_pay_log(order_id, '购买联通4G套餐', notify_url, 'wechatPay', 'SUCCESS')
+                    cls.create_order_pay_log(order_id, f'{serial_number}购买联通4G套餐', notify_url, 'wechatPay', 'SUCCESS')
                 else:
                     return response.json(444, {'param': 'pay_type'})