This commit is contained in:
yumoqing 2026-04-14 10:40:02 +08:00
parent cc8cb54a8a
commit 656205bac2
2 changed files with 27 additions and 1 deletions

View File

@ -22,7 +22,7 @@ async def get_orgid_by_username(sor, username):
async def accounting(username):
env = ServerEnv()
customerid = None
for i in range(10):
for i in range(1000):
resellerid = '0'
async with get_sor_context(env, 'accounting') as sor:
ais = []

View File

@ -0,0 +1,26 @@
username= params_kw.username
env = request._run_ns
async with get_sor_context(env, 'accounting') as sor:
sql = """select
d.username,
c.name,
a.balance
from account a, subject c, users d
where a.orgid = d.orgid
and a.subjectid = c.id
and d.username = ${username}$
"""
recs = swait or.sqlExe(sql, {
'username': username,
'sort': 'username'
})
return {
'status': 'ok',
'data': recs
}
return {
'status': 'error',
'data': {
'message': 'system error'
}
}