bugfix
This commit is contained in:
parent
cc8cb54a8a
commit
656205bac2
@ -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 = []
|
||||
|
||||
26
wwwroot/get_user_balance.dspy
Normal file
26
wwwroot/get_user_balance.dspy
Normal 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'
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user