fix: resellerid displays orgname instead of raw ID in tenant domain list
This commit is contained in:
parent
91861c828b
commit
8dd9c8d807
@ -7,6 +7,11 @@
|
|||||||
"browserfields": {
|
"browserfields": {
|
||||||
"exclouded": ["id"],
|
"exclouded": ["id"],
|
||||||
"alters": {
|
"alters": {
|
||||||
|
"resellerid": {
|
||||||
|
"uitype": "code",
|
||||||
|
"dataurl": "{{entire_url('../api/get_org_list.dspy')}}",
|
||||||
|
"datamethod": "GET"
|
||||||
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"uitype": "code",
|
"uitype": "code",
|
||||||
"data": [
|
"data": [
|
||||||
|
|||||||
10
wwwroot/api/get_org_list.dspy
Normal file
10
wwwroot/api/get_org_list.dspy
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
result = [{'resellerid': '', 'resellerid_text': '全部'}]
|
||||||
|
try:
|
||||||
|
db = DBPools()
|
||||||
|
async with db.sqlorContext('sage') as sor:
|
||||||
|
sql = "select id as resellerid, orgname as resellerid_text from organization where status='1' order by orgname"
|
||||||
|
rows = await sor.sqlExe(sql, {})
|
||||||
|
return json.dumps(result + list(rows), ensure_ascii=False)
|
||||||
|
except Exception as e:
|
||||||
|
debug(f'get_org_list error: {e}')
|
||||||
|
return json.dumps(result, ensure_ascii=False)
|
||||||
Loading…
x
Reference in New Issue
Block a user