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

20 lines
727 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

async def delmsg_config(ns={}):
"""删除站内信模板传入id"""
id = ns.get('id')
db = DBPools()
async with db.sqlorContext('kboss') as sor:
if id:
# 获取id对应的记录
data_list = await sor.R('message_config', {'id': id})
if data_list:
print(data_list)
data = data_list[0]
data['del_flg'] = '1'
await sor.U('message_config', data)
return {'status': True}
else:
return {'status': False, 'msg': '该id对应的记录不存在'}
else:
return {'status': False, 'msg': '未传入id'}
ret = await delmsg_config(params_kw)
return ret