From 1aa28430e07eff897cd3d522a19061cdd0810522 Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 17 Jun 2026 19:09:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20appcodes=E7=BC=96=E7=A0=81=E6=94=B9?= =?UTF-8?q?=E7=94=A8models=20codes=E6=AE=B5=E5=AE=9A=E4=B9=89=EF=BC=8C?= =?UTF-8?q?=E6=B8=85=E7=90=86json=20alters?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- json/llm.json | 6 ------ json/llm_api_map.json | 7 ------- json/llmusage.json | 15 +-------------- json/llmusage_accounting_failed.json | 9 +-------- json/llmusage_history.json | 15 +-------------- models/llm.json | 7 +++++++ models/llm_api_map.json | 7 +++++++ models/llmusage.json | 16 ++++++++++++++++ models/llmusage_accounting_failed.json | 9 +++++++++ models/llmusage_history.json | 16 ++++++++++++++++ 10 files changed, 58 insertions(+), 49 deletions(-) diff --git a/json/llm.json b/json/llm.json index 7ec904f..0b82d74 100644 --- a/json/llm.json +++ b/json/llm.json @@ -23,12 +23,6 @@ "browserfields": { "exclouded": ["id", "ownerid"], "alters": { - "status": { - "uitype": "code", - "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=llm_status", - "valueField": "k", - "textField": "v" - }, "ppid":{ "dataurl":"{{entire_url('/pricing/get_all_pricing_programs.dspy')}}", "textField": "name", diff --git a/json/llm_api_map.json b/json/llm_api_map.json index c368e2a..a0dca2f 100644 --- a/json/llm_api_map.json +++ b/json/llm_api_map.json @@ -16,13 +16,6 @@ "dataurl": "{{entire_url('../api/get_search_apiname.dspy')}}?allow_empty=1&llmid={{params_kw.llmid}}", "valueField": "apiname", "textField": "apiname_text" - }, - "isdefaultcatelog": { - "uitype": "code", - "data": [ - {"value": "0", "text": "否"}, - {"value": "1", "text": "是"} - ] } } }, diff --git a/json/llmusage.json b/json/llmusage.json index 833bdcb..b263aa8 100644 --- a/json/llmusage.json +++ b/json/llmusage.json @@ -5,20 +5,7 @@ "sortby": "use_time desc", "browserfields": { "exclouded": ["id"], - "alters": { - "status": { - "uitype": "code", - "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=llmusage_status", - "valueField": "k", - "textField": "v" - }, - "accounting_status": { - "uitype": "code", - "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=accounting_status", - "valueField": "k", - "textField": "v" - } - } + "alters": {} }, "editexclouded": ["id"], "editable": { diff --git a/json/llmusage_accounting_failed.json b/json/llmusage_accounting_failed.json index 156a0cd..125d1f2 100644 --- a/json/llmusage_accounting_failed.json +++ b/json/llmusage_accounting_failed.json @@ -5,14 +5,7 @@ "sortby": "failed_time desc", "browserfields": { "exclouded": ["id"], - "alters": { - "handled": { - "uitype": "code", - "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=handled_flg", - "valueField": "k", - "textField": "v" - } - } + "alters": {} }, "editexclouded": ["id", "llmusageid", "failed_time"], "editable": { diff --git a/json/llmusage_history.json b/json/llmusage_history.json index b267024..2224e81 100644 --- a/json/llmusage_history.json +++ b/json/llmusage_history.json @@ -5,20 +5,7 @@ "sortby": "use_time desc", "browserfields": { "exclouded": ["id"], - "alters": { - "status": { - "uitype": "code", - "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=llmusage_status", - "valueField": "k", - "textField": "v" - }, - "accounting_status": { - "uitype": "code", - "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=accounting_status", - "valueField": "k", - "textField": "v" - } - } + "alters": {} }, "editexclouded": ["id"], "editable": { diff --git a/models/llm.json b/models/llm.json index 5259993..a67cf12 100644 --- a/models/llm.json +++ b/models/llm.json @@ -108,6 +108,13 @@ "table": "organization", "valuefield": "id", "textfield": "orgname" + }, + { + "field": "status", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='llm_status'" } ] } \ No newline at end of file diff --git a/models/llm_api_map.json b/models/llm_api_map.json index 39e9b45..80f4667 100644 --- a/models/llm_api_map.json +++ b/models/llm_api_map.json @@ -118,6 +118,13 @@ "table": "pricing_program", "valuefield": "id", "textfield": "name" + }, + { + "field": "isdefaultcatelog", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='isdefaultcatelog_flg'" } ] } \ No newline at end of file diff --git a/models/llmusage.json b/models/llmusage.json index 3a9059a..d7c5ffd 100644 --- a/models/llmusage.json +++ b/models/llmusage.json @@ -144,5 +144,21 @@ "use_time" ] } + ], + "codes": [ + { + "field": "status", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='llmusage_status'" + }, + { + "field": "accounting_status", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='accounting_status'" + } ] } \ No newline at end of file diff --git a/models/llmusage_accounting_failed.json b/models/llmusage_accounting_failed.json index 554cc3f..45866e5 100644 --- a/models/llmusage_accounting_failed.json +++ b/models/llmusage_accounting_failed.json @@ -121,5 +121,14 @@ "idxtype": "index", "idxfields": ["failed_time"] } + ], + "codes": [ + { + "field": "handled", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='handled_flg'" + } ] } diff --git a/models/llmusage_history.json b/models/llmusage_history.json index 2f60dc5..94e11e5 100644 --- a/models/llmusage_history.json +++ b/models/llmusage_history.json @@ -142,5 +142,21 @@ "idxtype": "index", "idxfields": ["userid", "use_time"] } + ], + "codes": [ + { + "field": "status", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='llmusage_status'" + }, + { + "field": "accounting_status", + "table": "appcodes_kv", + "valuefield": "k", + "textfield": "v", + "cond": "parentid='accounting_status'" + } ] }