fix: remove uapiset references, use upappid for uapi-upapp direct join
This commit is contained in:
parent
8287c2c733
commit
0aa5a2a862
@ -16,6 +16,12 @@
|
|||||||
"type": "str",
|
"type": "str",
|
||||||
"length": 32
|
"length": 32
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "upappid",
|
||||||
|
"title": "上位系统ID",
|
||||||
|
"type": "str",
|
||||||
|
"length": 32
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"title": "api名称",
|
"title": "api名称",
|
||||||
@ -28,12 +34,6 @@
|
|||||||
"type": "str",
|
"type": "str",
|
||||||
"length": 100
|
"length": 100
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "apisetid",
|
|
||||||
"title": "API集id",
|
|
||||||
"type": "str",
|
|
||||||
"length": 32
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "description",
|
"name": "description",
|
||||||
"title": "接口描述",
|
"title": "接口描述",
|
||||||
@ -116,7 +116,7 @@
|
|||||||
"name": "idx1",
|
"name": "idx1",
|
||||||
"idxtype": "unique",
|
"idxtype": "unique",
|
||||||
"idxfields": [
|
"idxfields": [
|
||||||
"apisetid",
|
"upappid",
|
||||||
"name"
|
"name"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -129,12 +129,6 @@
|
|||||||
"textfield": "v",
|
"textfield": "v",
|
||||||
"cond": "parentid='httpmethod'"
|
"cond": "parentid='httpmethod'"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"field": "apisetid",
|
|
||||||
"table": "uapiset",
|
|
||||||
"valuefield": "id",
|
|
||||||
"textfield": "name"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"field": "need_auth",
|
"field": "need_auth",
|
||||||
"table": "appcodes_kv",
|
"table": "appcodes_kv",
|
||||||
|
|||||||
@ -63,6 +63,13 @@
|
|||||||
"title": "动态headers函数",
|
"title": "动态headers函数",
|
||||||
"type": "str",
|
"type": "str",
|
||||||
"length": 255
|
"length": 255
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "auth_apiname",
|
||||||
|
"title": "认证API名",
|
||||||
|
"type": "str",
|
||||||
|
"length": 200,
|
||||||
|
"nullable": "yes"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"codes": [
|
"codes": [
|
||||||
@ -71,12 +78,6 @@
|
|||||||
"table": "organization",
|
"table": "organization",
|
||||||
"valuefield": "id",
|
"valuefield": "id",
|
||||||
"textfield": "orgname"
|
"textfield": "orgname"
|
||||||
},
|
|
||||||
{
|
|
||||||
"field": "apisetid",
|
|
||||||
"table": "uapiset",
|
|
||||||
"valuefield": "id",
|
|
||||||
"textfield": "name"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -27,7 +27,7 @@ async def sor_get_uapi(sor, upappid, apiname):
|
|||||||
sql = """select a.*,
|
sql = """select a.*,
|
||||||
b.auth_apiname
|
b.auth_apiname
|
||||||
from uapi a, upapp b
|
from uapi a, upapp b
|
||||||
where a.apisetid = b.apisetid
|
where a.upappid = b.id
|
||||||
and a.name = ${apiname}$
|
and a.name = ${apiname}$
|
||||||
and b.id = ${upappid}$"""
|
and b.id = ${upappid}$"""
|
||||||
recs = await sor.sqlExe(sql, {'upappid': upappid, 'apiname': apiname})
|
recs = await sor.sqlExe(sql, {'upappid': upappid, 'apiname': apiname})
|
||||||
|
|||||||
@ -20,7 +20,7 @@ async def get_callerid(orgid):
|
|||||||
|
|
||||||
async def sor_get_uapi_by_appname_apiname(sor, appname, apiname):
|
async def sor_get_uapi_by_appname_apiname(sor, appname, apiname):
|
||||||
sql = """select a.* from uapi a, upapp b
|
sql = """select a.* from uapi a, upapp b
|
||||||
where a.apisetid = b.apisetid
|
where a.upappid = b.id
|
||||||
and b.name = ${appname}$
|
and b.name = ${appname}$
|
||||||
and a.name = ${apiname}$"""
|
and a.name = ${apiname}$"""
|
||||||
recs = await sor.sqlExe(sql, {'apiname': apiname, 'appname': appname})
|
recs = await sor.sqlExe(sql, {'apiname': apiname, 'appname': appname})
|
||||||
@ -92,7 +92,7 @@ async def sor_get_uapi(sor, upappid, apiname):
|
|||||||
sql = """select a.*,
|
sql = """select a.*,
|
||||||
b.auth_apiname
|
b.auth_apiname
|
||||||
from uapi a, upapp b
|
from uapi a, upapp b
|
||||||
where a.apisetid = b.apisetid
|
where a.upappid = b.id
|
||||||
and a.name = ${apiname}$
|
and a.name = ${apiname}$
|
||||||
and b.id = ${upappid}$"""
|
and b.id = ${upappid}$"""
|
||||||
recs = await sor.sqlExe(sql, {'upappid': upappid, 'apiname': apiname})
|
recs = await sor.sqlExe(sql, {'upappid': upappid, 'apiname': apiname})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user