salescrm/b/examine/ledge_examine.dspy
2025-10-27 15:50:44 +08:00

31 lines
1.5 KiB
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 ledge_examine(ns):
"""
线下充值审核提交
orgid 机构 id
user_id 内部用户id
business_id 业务id
form_component 表单参数
result_org 被执行机构
original_id 原充值日志id
"""
db = DBPools()
async with db.sqlorContext('kboss') as sor:
try:
orgid = await sor.R('users', {'id': ns['userid']})
apv_business = await sor.R('apv_business',{'del_flg':'0','business_name':'充值'})
if len(apv_business) < 1:
return {'status': False, 'msg': '失败'}
# print({'phone':orgid[0]['mobile'],'orgid':orgid[0]['orgid'],'user_id':ns['userid'],'business_id':apv_business[0]['id'],
# 'form_component':{"title": {"": ""},'detail': {'price': ns['balance']}},'result_org':ns['id']})
issue_approvecode = await issue_approve(phone=orgid[0]['mobile'] ,orgid=orgid[0]['orgid'], user_id=ns['userid'], business_id=apv_business[0]['id'],
form_component={"title": {"": ""},'detail': {'price': ns['balance']}}, result_org=ns['id'])
if issue_approvecode['status'] == True:
return {'status': True, 'msg': '提交成功,请等待审核'}
else:
return {'status': False, 'msg': issue_approvecode}
except Exception as e:
raise e
return {'status': False, 'msg': '失败'}
ret = await ledge_examine(params_kw)
return ret