feat: 投诉工单正规化(介入/牵连提现拦截,仅俱乐部开关)
支持被投诉对象、平台介入、协商中状态与组长投诉;提现硬拦含管事向上牵连组长,默认仅 lxs 开启。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
0
gongdan/management/commands/__init__.py
Normal file
0
gongdan/management/commands/__init__.py
Normal file
24
gongdan/management/commands/seed_gongdan_withdraw_block.py
Normal file
24
gongdan/management/commands/seed_gongdan_withdraw_block.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""种子:俱乐部工单提现拦截开关。默认仅 lxs 打开。"""
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from gongdan.services import ensure_club_gongdan_config
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = '初始化俱乐部工单配置(complaint_withdraw_block)'
|
||||
|
||||
def add_arguments(self, parser):
|
||||
parser.add_argument('--club-id', default='lxs', help='俱乐部 ID,默认 lxs')
|
||||
parser.add_argument('--enable', action='store_true', default=True, help='打开提现拦截')
|
||||
parser.add_argument('--disable', action='store_true', help='关闭提现拦截')
|
||||
|
||||
def handle(self, *args, **options):
|
||||
club_id = (options.get('club_id') or 'lxs').strip()
|
||||
enable = not options.get('disable')
|
||||
row = ensure_club_gongdan_config(club_id, withdraw_block=enable)
|
||||
if row.complaint_withdraw_block != enable:
|
||||
row.complaint_withdraw_block = enable
|
||||
row.save(update_fields=['complaint_withdraw_block', 'UpdateTime'])
|
||||
self.stdout.write(self.style.SUCCESS(
|
||||
f'club={club_id} complaint_withdraw_block={row.complaint_withdraw_block}'
|
||||
))
|
||||
Reference in New Issue
Block a user