@@ -31,8 +31,8 @@ def exec_clerk_send_jsapi_hb(user, elog, amount): |
||
31 | 31 |
|
32 | 32 |
elog.has_clerk_send_redpack = True |
33 | 33 |
elog.clerk_redpack_send_amount = amount |
34 |
- elog.user_id = user.user_id |
|
35 |
- elog.nickname = user.nickname |
|
34 |
+ elog.clerk_user_id = user.user_id |
|
35 |
+ elog.clerk_nickname = user.nickname |
|
36 | 36 |
elog.save() |
37 | 37 |
|
38 | 38 |
RedpackSendLogInfo.objects.create( |
@@ -7,7 +7,7 @@ from logs.models import MchInfoDecryptLogInfo, MchInfoEncryptLogInfo, MchLogInfo |
||
7 | 7 |
|
8 | 8 |
|
9 | 9 |
class MchInfoEncryptLogInfoAdmin(Readonly2ModelAdmin, admin.ModelAdmin): |
10 |
- list_display = ('plaintext', 'alg', 'ciphertext', 'brand_pk', 'model_pk', 'distributor_pk', 'sn', 'operator_id', 'is_send_redpack', 'redpack_amount', 'redpack_max_amount', 'has_send_redpack', 'redpack_send_amount', 'is_clerk_send_redpack', 'clerk_redpack_amount', 'clerk_redpack_max_amount', 'has_clerk_send_redpack', 'clerk_redpack_send_amount', 'user_id', 'nickname', 'status', 'created_at', 'updated_at') |
|
10 |
+ list_display = ('plaintext', 'alg', 'ciphertext', 'brand_pk', 'model_pk', 'distributor_pk', 'sn', 'operator_id', 'is_send_redpack', 'redpack_amount', 'redpack_max_amount', 'has_send_redpack', 'redpack_send_amount', 'user_id', 'nickname', 'is_clerk_send_redpack', 'clerk_redpack_amount', 'clerk_redpack_max_amount', 'has_clerk_send_redpack', 'clerk_redpack_send_amount', 'clerk_user_id', 'clerk_nickname', 'status', 'created_at', 'updated_at') |
|
11 | 11 |
list_filter = ('alg', 'brand_pk', 'model_pk', 'distributor_pk', 'operator_id', 'is_send_redpack', 'has_send_redpack', 'is_clerk_send_redpack', 'has_clerk_send_redpack', 'status') |
12 | 12 |
readonly_fields_exclude = ('is_send_redpack', 'redpack_amount', 'redpack_max_amount', 'is_clerk_send_redpack', 'clerk_redpack_amount', 'clerk_redpack_max_amount') |
13 | 13 |
|
@@ -0,0 +1,25 @@ |
||
1 |
+# -*- coding: utf-8 -*- |
|
2 |
+# Generated by Django 1.11.22 on 2019-08-16 10:27 |
|
3 |
+from __future__ import unicode_literals |
|
4 |
+ |
|
5 |
+from django.db import migrations, models |
|
6 |
+ |
|
7 |
+ |
|
8 |
+class Migration(migrations.Migration): |
|
9 |
+ |
|
10 |
+ dependencies = [ |
|
11 |
+ ('logs', '0009_auto_20190816_1815'), |
|
12 |
+ ] |
|
13 |
+ |
|
14 |
+ operations = [ |
|
15 |
+ migrations.AddField( |
|
16 |
+ model_name='mchinfoencryptloginfo', |
|
17 |
+ name='clerk_nickname', |
|
18 |
+ field=models.CharField(blank=True, help_text='\u9500\u552e\u5458\u7528\u6237\u6635\u79f0', max_length=255, null=True, verbose_name='clerk_nickname'), |
|
19 |
+ ), |
|
20 |
+ migrations.AddField( |
|
21 |
+ model_name='mchinfoencryptloginfo', |
|
22 |
+ name='clerk_user_id', |
|
23 |
+ field=models.CharField(blank=True, db_index=True, help_text='\u9500\u552e\u5458\u7528\u6237\u552f\u4e00\u6807\u8bc6(\u7ea2\u5305)', max_length=32, null=True, verbose_name='clerk_user_id'), |
|
24 |
+ ), |
|
25 |
+ ] |
@@ -26,14 +26,17 @@ class MchInfoEncryptLogInfo(BaseModelMixin): |
||
26 | 26 |
has_send_redpack = models.BooleanField(_(u'has_send_redpack'), default=False, help_text=u'是否已发放红包', db_index=True) |
27 | 27 |
redpack_send_amount = models.IntegerField(_(u'redpack_send_amount'), default=0, help_text=u'红包发放金额,单位:分)') |
28 | 28 |
|
29 |
+ user_id = models.CharField(_(u'user_id'), max_length=32, blank=True, null=True, help_text=u'用户唯一标识(红包)', db_index=True) |
|
30 |
+ nickname = models.CharField(_(u'nickname'), max_length=255, blank=True, null=True, help_text=u'用户昵称') |
|
31 |
+ |
|
29 | 32 |
is_clerk_send_redpack = models.BooleanField(_(u'is_clerk_send_redpack'), default=False, help_text=u'销售员是否发放红包', db_index=True) |
30 | 33 |
clerk_redpack_amount = models.IntegerField(_(u'clerk_redpack_amount'), default=0, help_text=u'销售员红包固定金额,单位:分') |
31 | 34 |
clerk_redpack_max_amount = models.IntegerField(_(u'clerk_redpack_max_amount'), default=0, help_text=u'销售员红包金额范围,单位:分)') |
32 | 35 |
has_clerk_send_redpack = models.BooleanField(_(u'has_clerk_send_redpack'), default=False, help_text=u'销售员是否已发放红包', db_index=True) |
33 | 36 |
clerk_redpack_send_amount = models.IntegerField(_(u'clerk_redpack_send_amount'), default=0, help_text=u'销售员红包发放金额,单位:分)') |
34 | 37 |
|
35 |
- user_id = models.CharField(_(u'user_id'), max_length=32, blank=True, null=True, help_text=u'用户唯一标识(红包)', db_index=True) |
|
36 |
- nickname = models.CharField(_(u'nickname'), max_length=255, blank=True, null=True, help_text=u'用户昵称') |
|
38 |
+ clerk_user_id = models.CharField(_(u'clerk_user_id'), max_length=32, blank=True, null=True, help_text=u'销售员用户唯一标识(红包)', db_index=True) |
|
39 |
+ clerk_nickname = models.CharField(_(u'clerk_nickname'), max_length=255, blank=True, null=True, help_text=u'销售员用户昵称') |
|
37 | 40 |
|
38 | 41 |
class Meta: |
39 | 42 |
verbose_name = _(u'mchinfoencryptloginfo') |
@@ -46,8 +49,13 @@ class MchInfoEncryptLogInfo(BaseModelMixin): |
||
46 | 49 |
def redpack_info(self): |
47 | 50 |
return { |
48 | 51 |
'has_send_redpack': self.has_send_redpack, |
52 |
+ 'redpack_send_amount': self.redpack_send_amount, |
|
49 | 53 |
'user_id': self.user_id, |
50 | 54 |
'nickname': self.nickname, |
55 |
+ 'has_clerk_send_redpack': self.has_clerk_send_redpack, |
|
56 |
+ 'clerk_redpack_send_amount': self.clerk_redpack_send_amount, |
|
57 |
+ 'clerk_user_id': self.clerk_user_id, |
|
58 |
+ 'clerk_nickname': self.clerk_nickname, |
|
51 | 59 |
} |
52 | 60 |
|
53 | 61 |
|