商品与专区、店铺增加 club_id(历史默认 xq);列表按俱乐部过滤;工单列表返回待办统计;新增 hqshouji/rzwlsjh 手机号查询与认证接口。 Co-authored-by: Cursor <cursoragent@cursor.com>
30 lines
831 B
Python
30 lines
831 B
Python
from django.db import migrations, models
|
|
from django.db.models import Q
|
|
|
|
|
|
def backfill_club_xq(apps, schema_editor):
|
|
Dianpu = apps.get_model('shop', 'Dianpu')
|
|
Dianpu.objects.filter(Q(club_id__isnull=True) | Q(club_id='')).update(club_id='xq')
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('shop', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name='dianpu',
|
|
name='club_id',
|
|
field=models.CharField(
|
|
db_index=True,
|
|
default='xq',
|
|
help_text='店铺按俱乐部隔离;历史数据默认星阙 xq',
|
|
max_length=16,
|
|
verbose_name='所属俱乐部',
|
|
),
|
|
),
|
|
migrations.RunPython(backfill_club_xq, migrations.RunPython.noop),
|
|
]
|