kboss/b/user/up_white_list.dspy
2025-07-16 14:27:17 +08:00

18 lines
683 B
Plaintext

async def up_white_list(ns):
"""运营修改审核设备发布开白名单资格"""
db = DBPools()
async with db.sqlorContext('kboss') as sor:
try:
if ns.get('type') == '1':
# 同意开白
await sor.U('white_list', {'id': ns.get('id'),'type': '1'})
return {'status': True, 'msg': '审核通过'}
elif ns.get('type') == '2':
# 拒绝开白
await sor.U('white_list', {'id': ns.get('id'),'type': '2'})
except Exception as error:
raise error
return {'status': False, 'msg': '添加失败'}
ret = await up_white_list(params_kw)
return ret