async def delete_apv_business(ns={}): try: data = { "id": ns["id"], "del_flg": ns["del_flg"], } except Exception as e: return {"status": False, "msg": f"参数解析错误,请检查参数:{e}"} db = DBPools() async with db.sqlorContext('kboss') as sor: data['update_at'] = '{}'.format(datetime.datetime.now()) sql = "update apv_business set del_flg = ${del_flg}$,update_at = ${update_at}$ where id = ${id}$ and del_flg = 0" num = await sor.sqlExe(sql, data) if num == 0: return {"status": False, "msg": "删除失败,数据未更改"} else: return {"status": True, "msg": "success"} ret = await delete_apv_business(params_kw) return ret