dc7090c1bae9f580a338c3a32c5R30">30
         (PAID, '已支付'),
31 31
         (FAIL, '已失败'),
32
-        # (DELETED, u'已删除'),
32
+        # (DELETED, '已删除'),
33 33
     )
34 34
 
35 35
     order_id = ShortUUIDField(_('order_id'), max_length=32, help_text='订单唯一标识', db_index=True)
@@ -55,7 +55,7 @@ class OrderInfo(BaseModelMixin):
55 55
 
56 56
     trade_type = models.CharField(_('trade_type'), max_length=255, blank=True, null=True, help_text='支付方式')
57 57
 
58
-    pay_status = models.IntegerField(_('pay_status'), choices=PAY_STATUS, default=WAITING_PAY, help_text=u'支付状态', db_index=True)
58
+    pay_status = models.IntegerField(_('pay_status'), choices=PAY_STATUS, default=WAITING_PAY, help_text='支付状态', db_index=True)
59 59
     paid_at = models.DateTimeField(_('paid_at'), blank=True, null=True, help_text=_('支付时间'))
60 60
 
61 61
     reback_status = models.BooleanField(_('reback_status'), default=False, help_text='退款状态', db_index=True)

+ 1 - 1
pay/views.py

@@ -127,7 +127,7 @@ def wx_order_create_api(request):
127 127
     elif trade_type == 'APP':
128 128
         wxpay_params = wxpay.order.get_appapi_params(prepay_id)
129 129
 
130
-    return response(200, 'Order Create Success', u'订单创建成功', {
130
+    return response(200, 'Order Create Success', '订单创建成功', {
131 131
         'order_id': order.order_id,
132 132
         'prepay_id': prepay_id,
133 133
         'wxpay_params': wxpay_params,

+ 35 - 35
utils/error/errno_utils.py

@@ -5,62 +5,62 @@ from StatusCode import BaseStatusCode, StatusCodeField
5 5
 
6 6
 class AdministratorStatusCode(BaseStatusCode):
7 7
     """ 操作员相关错误码 4002xx """
8
-    ADMINISTRATOR_NOT_FOUND = StatusCodeField(400201, 'Administrator Not Found', description=u'管理员不存在')
8
+    ADMINISTRATOR_NOT_FOUND = StatusCodeField(400201, 'Administrator Not Found', description='管理员不存在')
9 9
     # 密码
10
-    ADMINISTRATOR_PASSWORD_ERROR = StatusCodeField(400202, 'Administrator Password Error', description=u'管理员密码错误')
10
+    ADMINISTRATOR_PASSWORD_ERROR = StatusCodeField(400202, 'Administrator Password Error', description='管理员密码错误')
11 11
     # 用户名
12
-    ADMINISTRATOR_NAME_ALREADY_EXISTS = StatusCodeField(400205, 'Administrator Name Already Exists', description=u'管理员手机号已经存在')
12
+    ADMINISTRATOR_NAME_ALREADY_EXISTS = StatusCodeField(400205, 'Administrator Name Already Exists', description='管理员手机号已经存在')
13 13
     # 状态
14
-    ADMINISTRATOR_NOT_ACTIVATED = StatusCodeField(400215, 'Administrator Not Activated', description=u'管理员未激活')
15
-    ADMINISTRATOR_HAS_DISABLED = StatusCodeField(400216, 'Administrator Has Disabled', description=u'管理员已禁用')
16
-    ADMINISTRATOR_HAS_DELETED = StatusCodeField(400217, 'Administrator Has Deleted', description=u'管理员已删除')
14
+    ADMINISTRATOR_NOT_ACTIVATED = StatusCodeField(400215, 'Administrator Not Activated', description='管理员未激活')
15
+    ADMINISTRATOR_HAS_DISABLED = StatusCodeField(400216, 'Administrator Has Disabled', description='管理员已禁用')
16
+    ADMINISTRATOR_HAS_DELETED = StatusCodeField(400217, 'Administrator Has Deleted', description='管理员已删除')
17 17
 
18 18
 
19 19
 class ParamStatusCode(BaseStatusCode):
20 20
     """ 4000xx 参数相关错误码 """
21
-    PARAM_NOT_FOUND = StatusCodeField(400000, 'Param Not Found', description=u'参数不存在')
21
+    PARAM_NOT_FOUND = StatusCodeField(400000, 'Param Not Found', description='参数不存在')
22 22
 
23 23
 
24 24
 class ProfileStatusCode(BaseStatusCode):
25 25
     """ 4001xx 用户相关错误码 """
26
-    PROFILE_NOT_FOUND = StatusCodeField(400101, 'Profile Not Found', description=u'用户不存在')
26
+    PROFILE_NOT_FOUND = StatusCodeField(400101, 'Profile Not Found', description='用户不存在')
27 27
 
28 28
 
29 29
 class PhoneStatusCode(BaseStatusCode):
30 30
     """ 4002xx 手机相关错误码 """
31
-    INVALID_PHONE = StatusCodeField(400200, 'Invalid Phone', description=u'非法手机号')
32
-    PHONE_NOT_FOUND = StatusCodeField(400201, 'Phone Not Found', description=u'手机号不存在')
33
-    PHONE_ALREADY_EXISTS = StatusCodeField(400202, 'Phone Already Exists', description=u'手机号已存在')
31
+    INVALID_PHONE = StatusCodeField(400200, 'Invalid Phone', description='非法手机号')
32
+    PHONE_NOT_FOUND = StatusCodeField(400201, 'Phone Not Found', description='手机号不存在')
33
+    PHONE_ALREADY_EXISTS = StatusCodeField(400202, 'Phone Already Exists', description='手机号已存在')
34 34
 
35 35
 
36 36
 class UserStatusCode(BaseStatusCode):
37
-    USER_NOT_FOUND = StatusCodeField(400301, 'User Not Found', description=u'用户不存在')
37
+    USER_NOT_FOUND = StatusCodeField(400301, 'User Not Found', description='用户不存在')
38 38
 
39 39
 
40 40
 class KOLStatusCode(BaseStatusCode):
41
-    KOL_NOT_FOUND = StatusCodeField(401001, 'KOL Not Found', description=u'KOL不存在')
41
+    KOL_NOT_FOUND = StatusCodeField(401001, 'KOL Not Found', description='KOL不存在')
42 42
 
43 43
 
44 44
 class PackStatusCode(BaseStatusCode):
45
-    PACK_NOT_FOUND = StatusCodeField(402001, 'Pack Not Found', description=u'包不存在')
45
+    PACK_NOT_FOUND = StatusCodeField(402001, 'Pack Not Found', description='包不存在')
46 46
 
47 47
 
48 48
 class PackGoodsStatusCode(BaseStatusCode):
49
-    PACK_GOODS_NOT_FOUND = StatusCodeField(403001, 'Pack Goods Not Found', description=u'包商品不存在')
50
-    PACK_GOODS_INVENTORY_SHORTAGE = StatusCodeField(403002, 'Pack Goods Inventory Shortage', description=u'库存不足')
49
+    PACK_GOODS_NOT_FOUND = StatusCodeField(403001, 'Pack Goods Not Found', description='包商品不存在')
50
+    PACK_GOODS_INVENTORY_SHORTAGE = StatusCodeField(403002, 'Pack Goods Inventory Shortage', description='库存不足')
51 51
 
52 52
 
53 53
 class OrderStatusCode(BaseStatusCode):
54 54
     """ 4040xx 订单/支付相关错误码 """
55
-    UNIFIED_ORDER_FAIL = StatusCodeField(404000, 'Unified Order Fail', description=u'统一下单失败')
56
-    ORDER_NOT_FOUND = StatusCodeField(404001, 'Order Not Found', description=u'订单不存在')
55
+    UNIFIED_ORDER_FAIL = StatusCodeField(404000, 'Unified Order Fail', description='统一下单失败')
56
+    ORDER_NOT_FOUND = StatusCodeField(404001, 'Order Not Found', description='订单不存在')
57 57
     # 订单支付状态
58
-    ORDER_NOT_PAY = StatusCodeField(404011, 'Order Not Pay', description=u'订单未支付')
59
-    ORDER_PAYING = StatusCodeField(404012, 'Order Paying', description=u'订单支付中')
60
-    ORDER_PAY_FAIL = StatusCodeField(404013, 'Order Pay Fail', description=u'微信支付失败')
58
+    ORDER_NOT_PAY = StatusCodeField(404011, 'Order Not Pay', description='订单未支付')
59
+    ORDER_PAYING = StatusCodeField(404012, 'Order Paying', description='订单支付中')
60
+    ORDER_PAY_FAIL = StatusCodeField(404013, 'Order Pay Fail', description='微信支付失败')
61 61
     # 通知校验状态
62
-    SIGN_CHECK_FAIL = StatusCodeField(404090, 'Sign Check Fail', description=u'签名校验失败')
63
-    FEE_CHECK_FAIL = StatusCodeField(404091, 'FEE Check Fail', description=u'金额校验失败')
62
+    SIGN_CHECK_FAIL = StatusCodeField(404090, 'Sign Check Fail', description='签名校验失败')
63
+    FEE_CHECK_FAIL = StatusCodeField(404091, 'FEE Check Fail', description='金额校验失败')
64 64
 
65 65
 
66 66
 class PayStatusCode(BaseStatusCode):
@@ -69,39 +69,39 @@ class PayStatusCode(BaseStatusCode):
69 69
 
70 70
 class WithdrawStatusCode(BaseStatusCode):
71 71
     """ 4042xx 提现相关错误码 """
72
-    BALANCE_INSUFFICIENT = StatusCodeField(404200, 'Balance Insufficient', description=u'提现金额不足')
72
+    BALANCE_INSUFFICIENT = StatusCodeField(404200, 'Balance Insufficient', description='提现金额不足')
73 73
 
74 74
 
75 75
 class TokenStatusCode(BaseStatusCode):
76 76
     """ 4090xx 票据相关错误码 """
77
-    TOKEN_NOT_FOUND = StatusCodeField(409001, 'Token Not Found', description=u'票据不存在')
77
+    TOKEN_NOT_FOUND = StatusCodeField(409001, 'Token Not Found', description='票据不存在')
78 78
 
79 79
 
80 80
 class SignatureStatusCode(BaseStatusCode):
81 81
     """ 4091xx 签名校验错误 """
82
-    SIGNATURE_ERROR = StatusCodeField(409101, 'Signature Error', description=u'签名错误')
82
+    SIGNATURE_ERROR = StatusCodeField(409101, 'Signature Error', description='签名错误')
83 83
 
84 84
 
85 85
 class GVCodeStatusCode(BaseStatusCode):
86 86
     """ 4092xx 图形验证码相关错误码 """
87
-    GRAPHIC_VCODE_ERROR = StatusCodeField(409201, 'Graphic VCode Error', description=u'图形验证码错误')
87
+    GRAPHIC_VCODE_ERROR = StatusCodeField(409201, 'Graphic VCode Error', description='图形验证码错误')
88 88
 
89 89
 
90 90
 class SVCodeStatusCode(BaseStatusCode):
91 91
     """ 4093xx 短信验证码相关错误码 """
92
-    SMS_QUOTA_LIMIT = StatusCodeField(409300, 'SMS Quota Limit', description=u'短信次数超限')
93
-    SMS_VCODE_ERROR = StatusCodeField(409301, 'SMS VCode Error', description=u'验证码错误,请稍后重试')
94
-    SMS_VCODE_HAS_SEND = StatusCodeField(409302, 'SMS VCode Has Send', description=u'验证码已发送,请勿重复获取')
92
+    SMS_QUOTA_LIMIT = StatusCodeField(409300, 'SMS Quota Limit', description='短信次数超限')
93
+    SMS_VCODE_ERROR = StatusCodeField(409301, 'SMS VCode Error', description='验证码错误,请稍后重试')
94
+    SMS_VCODE_HAS_SEND = StatusCodeField(409302, 'SMS VCode Has Send', description='验证码已发送,请勿重复获取')
95 95
 
96 96
 
97 97
 class InsufficientStatusCode(BaseStatusCode):
98 98
     """ 4095xx 不足相关错误码 """
99
-    BALANCE_INSUFFICIENT = StatusCodeField(409501, 'Balance Insufficient', description=u'余额不足')
100
-    INTEGRAL_INSUFFICIENT = StatusCodeField(409502, 'Integral Insufficient', description=u'积分不足')
99
+    BALANCE_INSUFFICIENT = StatusCodeField(409501, 'Balance Insufficient', description='余额不足')
100
+    INTEGRAL_INSUFFICIENT = StatusCodeField(409502, 'Integral Insufficient', description='积分不足')
101 101
 
102 102
 
103 103
 class PermissionStatusCode(BaseStatusCode):
104 104
     """ 4099xx 权限相关错误码 """
105
-    PERMISSION_DENIED = StatusCodeField(409900, 'Permission Denied', description=u'权限不足')
106
-    UPLOAD_PERMISSION_DENIED = StatusCodeField(409910, 'Upload Permission Denied', description=u'上传权限不足')
107
-    UPDATE_PERMISSION_DENIED = StatusCodeField(409930, 'Update Permission Denied', description=u'更新权限不足')
105
+    PERMISSION_DENIED = StatusCodeField(409900, 'Permission Denied', description='权限不足')
106
+    UPLOAD_PERMISSION_DENIED = StatusCodeField(409910, 'Upload Permission Denied', description='上传权限不足')
107
+    UPDATE_PERMISSION_DENIED = StatusCodeField(409930, 'Update Permission Denied', description='更新权限不足')

pai2 - Gogs: Go Git Service