| @@ -8,7 +8,7 @@ from mch.models import ConsumeInfoSubmitLogInfo | ||
| 8 | 8 |  | 
| 9 | 9 |  | 
| 10 | 10 | class UserInfoAdmin(ChangeOnlyModelAdmin, admin.ModelAdmin): | 
| 11 | -    list_display = ('user_id', 'nickname', 'phone', 'appid', 'unionid', 'openid', 'openid_miniapp', 'location', 'balance', 'integral', 'freeze_integral', 'user_status', 'test_user', 'integral', 'freeze_integral', 'shots_num', 'level', 'coupon_expire_at', 'is_maintenance', 'status', 'created_at', 'updated_at') | |
| 11 | +    list_display = ('user_id', 'nickname', 'phone', 'appid', 'unionid', 'openid', 'openid_miniapp', 'location', 'balance', 'user_status', 'test_user', 'integral', 'freeze_integral', 'shots_num', 'level', 'coupon_expire_at', 'is_maintenance', 'status', 'created_at', 'updated_at') | |
| 12 | 12 |      list_filter = ('user_from', 'appid', 'subscribe', 'has_membercard', 'test_user', 'is_maintenance', 'sex', 'user_status', 'status', 'code_version', 'new_subscribe', 'created_at', 'integral') | 
| 13 | 13 |      readonly_fields = ('user_id', ) | 
| 14 | 14 |      search_fields = ('user_id', 'username', 'unionid', 'openid', 'openid_miniapp', 'name', 'phone', 'location', 'memberusercardcode') | 
| @@ -20,8 +20,9 @@ class UserInfoAdmin(ChangeOnlyModelAdmin, admin.ModelAdmin): | ||
| 20 | 20 |  | 
| 21 | 21 |  | 
| 22 | 22 | class UserIntegralIncomeExpensesInfoAdmin(ChangeOnlyModelAdmin, admin.ModelAdmin): | 
| 23 | -    list_display = ('user_id', 'model_id', 'model_name', 'code', 'integral', 'remark', 'updated_at', 'created_at') | |
| 24 | -    search_fields = ('user_id',) | |
| 23 | +    list_display = ('user_id', 'brand_id', 'brand_name', 'model_id', 'model_name', 'code', 'integral_from', 'integral', 'final_integral', 'remark', 'updated_at', 'created_at') | |
| 24 | +    list_filter = ('integral_from', 'status') | |
| 25 | +    search_fields = ('user_id', ) | |
| 25 | 26 |  | 
| 26 | 27 |  | 
| 27 | 28 | admin.site.register(UserInfo, UserInfoAdmin) | 
| @@ -0,0 +1,19 @@ | ||
| 1 | +# -*- coding: utf-8 -*- | |
| 2 | +# Generated by Django 3.2.16 on 2022-10-27 10:07 | |
| 3 | + | |
| 4 | +from django.db import migrations, models | |
| 5 | + | |
| 6 | + | |
| 7 | +class Migration(migrations.Migration): | |
| 8 | + | |
| 9 | + dependencies = [ | |
| 10 | +        ('account', '0054_userinfo_coupon_expire_at'), | |
| 11 | + ] | |
| 12 | + | |
| 13 | + operations = [ | |
| 14 | + migrations.AddField( | |
| 15 | + model_name='userintegralincomeexpensesinfo', | |
| 16 | + name='final_integral', | |
| 17 | + field=models.IntegerField(default=0, help_text='最终积分', verbose_name='final_integral'), | |
| 18 | + ), | |
| 19 | + ] | 
| @@ -343,14 +343,14 @@ class UserIntegralIncomeExpensesInfo(BaseModelMixin): | ||
| 343 | 343 | brand_id = models.CharField(_(u'brand_id'), max_length=32, blank=True, null=True, help_text=u'品牌唯一标识', db_index=True) | 
| 344 | 344 | brand_name = models.CharField(_(u'brand_name'), max_length=255, blank=True, null=True, help_text=u'品牌名称') | 
| 345 | 345 |  | 
| 346 | - integral_from = models.IntegerField(_(u'integral_from'), choices=INTEGRAL_FROM, default=PRODUCT, help_text=u'积分来源') | |
| 347 | - | |
| 348 | 346 | model_id = models.CharField(_(u'model_id'), max_length=32, blank=True, null=True, help_text=u'型号唯一标识', db_index=True) | 
| 349 | 347 | model_name = models.CharField(_(u'model_name'), max_length=255, blank=True, null=True, help_text=u'型号名称') | 
| 350 | 348 |  | 
| 351 | 349 | code = models.CharField(_(u'code'), max_length=32, blank=True, null=True, help_text=u'机身码', db_index=True) | 
| 352 | 350 |  | 
| 351 | + integral_from = models.IntegerField(_(u'integral_from'), choices=INTEGRAL_FROM, default=PRODUCT, help_text=u'积分来源') | |
| 353 | 352 | integral = models.IntegerField(_(u'integral'), default=0, help_text=u'增减积分') | 
| 353 | + final_integral = models.IntegerField(_(u'final_integral'), default=0, help_text=u'最终积分') | |
| 354 | 354 |  | 
| 355 | 355 | remark = models.CharField(_(u'remark'), max_length=255, blank=True, null=True, help_text=u'备注') | 
| 356 | 356 |  |