fix: remove uapiset references, use upappid for uapi-upapp direct join

This commit is contained in:
yumoqing 2026-05-21 15:49:04 +08:00
parent 8287c2c733
commit 0aa5a2a862
4 changed files with 17 additions and 22 deletions

View File

@ -16,6 +16,12 @@
"type": "str",
"length": 32
},
{
"name": "upappid",
"title": "上位系统ID",
"type": "str",
"length": 32
},
{
"name": "name",
"title": "api名称",
@ -28,12 +34,6 @@
"type": "str",
"length": 100
},
{
"name": "apisetid",
"title": "API集id",
"type": "str",
"length": 32
},
{
"name": "description",
"title": "接口描述",
@ -116,7 +116,7 @@
"name": "idx1",
"idxtype": "unique",
"idxfields": [
"apisetid",
"upappid",
"name"
]
}
@ -129,12 +129,6 @@
"textfield": "v",
"cond": "parentid='httpmethod'"
},
{
"field": "apisetid",
"table": "uapiset",
"valuefield": "id",
"textfield": "name"
},
{
"field": "need_auth",
"table": "appcodes_kv",

View File

@ -63,6 +63,13 @@
"title": "动态headers函数",
"type": "str",
"length": 255
},
{
"name": "auth_apiname",
"title": "认证API名",
"type": "str",
"length": 200,
"nullable": "yes"
}
],
"codes": [
@ -71,12 +78,6 @@
"table": "organization",
"valuefield": "id",
"textfield": "orgname"
},
{
"field": "apisetid",
"table": "uapiset",
"valuefield": "id",
"textfield": "name"
}
]
}

View File

@ -27,7 +27,7 @@ async def sor_get_uapi(sor, upappid, apiname):
sql = """select a.*,
b.auth_apiname
from uapi a, upapp b
where a.apisetid = b.apisetid
where a.upappid = b.id
and a.name = ${apiname}$
and b.id = ${upappid}$"""
recs = await sor.sqlExe(sql, {'upappid': upappid, 'apiname': apiname})

View File

@ -20,7 +20,7 @@ async def get_callerid(orgid):
async def sor_get_uapi_by_appname_apiname(sor, appname, apiname):
sql = """select a.* from uapi a, upapp b
where a.apisetid = b.apisetid
where a.upappid = b.id
and b.name = ${appname}$
and a.name = ${apiname}$"""
recs = await sor.sqlExe(sql, {'apiname': apiname, 'appname': appname})
@ -92,7 +92,7 @@ async def sor_get_uapi(sor, upappid, apiname):
sql = """select a.*,
b.auth_apiname
from uapi a, upapp b
where a.apisetid = b.apisetid
where a.upappid = b.id
and a.name = ${apiname}$
and b.id = ${upappid}$"""
recs = await sor.sqlExe(sql, {'upappid': upappid, 'apiname': apiname})