salescrm/b/cpcc/cpclabel/delete_cpclabel.dspy
2025-10-27 15:50:44 +08:00

25 lines
821 B
Plaintext
Raw Permalink 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 delete_cpclabel(params_kw={}):
ns = {
'id':params_kw['id'],
}
if not params_kw['id']:
return {'status': False,'msg': '无资源标签ID'}
orgid = await get_userorgid()
if not orgid:
orgid = params_kw.get("orgid",'000')
debug(f' >>> 当前资源标签ID: {orgid} 标签ID{params_kw["id"]}')
ns['orgid'] = orgid
db = DBPools()
# dbname = await rfexe('get_module_dbname', 'cpcc')
dbname = 'kboss'
async with db.sqlorContext(dbname) as sor:
r = await sor.D('cpclabel', ns)
debug('delete success');
return {'status': True,'msg': '删除资源标签成功','data': ns}
debug('Delete failed');
return {'status': True,'msg': '删除资源标签失败','data': ns}
ret = await delete_cpclabel(params_kw)
return ret