Skip to content

Commit 07ff6e7

Browse files
wuayeewuayee
andauthored
隐藏内置应用 (ModelEngine-Group#484)
* [appBuilder] 应用市场隐藏内置应用 * [appBuilder] 应用开发隐藏内置应用 --------- Co-authored-by: wuayee <[email protected]>
1 parent 2dd802b commit 07ff6e7

File tree

7 files changed

+40
-18
lines changed

7 files changed

+40
-18
lines changed

app-builder/plugins/aipp-custom-model-center/src/main/resources/sql/data/tr_t_model_import.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,5 @@ INSERT INTO "public"."store_app" ("like_count", "download_count", "source", "ico
6363
INSERT INTO "public"."store_tool" ("name", "schema", "runnables", "extensions", "unique_name", "version", "is_latest", "group_name", "definition_name", "definition_group_name") VALUES ('模型配置应用', '{"name":"模型配置应用","description":"当你想要配置模型的时候,请使用我!","manualIntervention":false,"parameters":{"type":"object","properties":{"aippId":{"description":"the aipp id of the waterFlow tool","default":"0b4fe5a430104edfbe0dc6cff0ebea19","type":"string"},"tenantId":{"description":"the tenant id of the waterFlow tool","default":"31f20efc7e0848deab6a6bc10fc3021e","type":"string"},"inputParams":{"type":"object","properties":{"Question":{"type":"string","description":"这是用户输入的问题。"}},"required":["Question"],"order":["Question"]},"version":{"description":"the aipp version of the waterFlow tool","default":"1.0.0","type":"string"}},"required":["tenantId","aippId","version","inputParams"]},"return":{"type":"object","properties":{}},"order":["tenantId","aippId","version","inputParams"]}', '{"FIT":{"fitableId":"water.flow.invoke","genericableId":"07b51bd246594c159d403164369ce1db"},"APP":{"aippId":"0b4fe5a430104edfbe0dc6cff0ebea19","appCategory":"chatbot","version":"1.0.0","appId":"cec6bfe7cb3a444f8a26a97ea513e501"}}', 'null', '7a76cbd2-881d-469b-b2df-76abed7d0b61', '1.0.0', 't', '7a76cbd2-881d-469b-b2df-76abed7d0b61', '7a76cbd2-881d-469b-b2df-76abed7d0b61', '7a76cbd2-881d-469b-b2df-76abed7d0b61') ON CONFLICT ("unique_name", "version") DO NOTHING;
6464

6565
INSERT INTO "public"."store_tag" ("tool_unique_name", "name") VALUES ('7a76cbd2-881d-469b-b2df-76abed7d0b61', 'APP') ON CONFLICT ("tool_unique_name", "name") DO NOTHING;
66-
INSERT INTO "public"."store_tag" ("tool_unique_name", "name") VALUES ('7a76cbd2-881d-469b-b2df-76abed7d0b61', 'APP_TYPE_B653EDB7EB5A49BE91ABCD2C5877C6AD') ON CONFLICT ("tool_unique_name", "name") DO NOTHING;
66+
INSERT INTO "public"."store_tag" ("tool_unique_name", "name") VALUES ('7a76cbd2-881d-469b-b2df-76abed7d0b61', 'APP_TYPE_B653EDB7EB5A49BE91ABCD2C5877C6AD') ON CONFLICT ("tool_unique_name", "name") DO NOTHING;
67+
INSERT INTO "public"."store_tag" ("tool_unique_name", "name") VALUES ('7a76cbd2-881d-469b-b2df-76abed7d0b61', 'BUILTIN') ON CONFLICT ("tool_unique_name", "name") DO NOTHING;

app-builder/plugins/aipp-plugin/src/main/resources/sql/data/tr_t_interview.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
INSERT INTO "public"."app_builder_app" ("id", "name", "create_by", "create_at", "update_by", "update_at", "config_id", "flow_graph_id", "tenant_id", "type", "version", "attributes", "state", "app_built_type", "app_category", "collection_usr_cnt", "is_deleted", "path", "app_type", "app_suite_id", "is_active", "status", "unique_name", "publish_at", "app_id", "user_group_id") VALUES ('fd8166b5005e4d66a77d318f3b1dd5e5', '面试助手-v3', 'Jade', '2025-04-28 08:36:13.767496', 'Jade', '2025-04-28 08:37:15.197182', '68da40b4e47e4743a59c2beac9002dc7', '24f72de428124eb19fd12db36ebcfd34', '31f20efc7e0848deab6a6bc10fc3021e', 'app', '1.0.0', '{"icon": "", "name": "面试助手-v3", "greeting": "", "store_id": "e8bbd29c-e529-4c8e-abdb-b355b2d8dcdf", "is_update": false, "description": "", "publishedUpdateLog": "", "publishedDescription": ""}', 'active', 'workflow', 'chatbot', 0, 0, '3v8ZU1cMRV0oRcqu', '4db152b24f94473ab683b1acbfe3c865', 'ec6f8e93a80541bb930fc22678ef7043', 't', 'published', 'e8bbd29c-e529-4c8e-abdb-b355b2d8dcdf', '2025-04-28 08:39:03', 'fd8166b5005e4d66a77d318f3b1dd5e5', '*') ON CONFLICT (id) DO NOTHING;
1+
INSERT INTO "public"."app_builder_app" ("id", "name", "create_by", "create_at", "update_by", "update_at", "config_id", "flow_graph_id", "tenant_id", "type", "version", "attributes", "state", "app_built_type", "app_category", "collection_usr_cnt", "is_deleted", "path", "app_type", "app_suite_id", "is_active", "status", "unique_name", "publish_at", "app_id", "user_group_id") VALUES ('fd8166b5005e4d66a77d318f3b1dd5e5', '面试助手-v3', 'system', '2025-04-28 08:36:13.767496', 'system', '2025-04-28 08:37:15.197182', '68da40b4e47e4743a59c2beac9002dc7', '24f72de428124eb19fd12db36ebcfd34', '31f20efc7e0848deab6a6bc10fc3021e', 'app', '1.0.0', '{"icon": "", "name": "面试助手-v3", "greeting": "", "store_id": "e8bbd29c-e529-4c8e-abdb-b355b2d8dcdf", "is_update": false, "description": "", "publishedUpdateLog": "", "publishedDescription": ""}', 'active', 'workflow', 'chatbot', 0, 0, '3v8ZU1cMRV0oRcqu', '4db152b24f94473ab683b1acbfe3c865', 'ec6f8e93a80541bb930fc22678ef7043', 't', 'published', 'e8bbd29c-e529-4c8e-abdb-b355b2d8dcdf', '2025-04-28 08:39:03', 'fd8166b5005e4d66a77d318f3b1dd5e5', '*') ON CONFLICT (id) DO NOTHING;
22

33
INSERT INTO "public"."app_builder_config" ("id", "form_id", "app_id", "tenant_id", "create_by", "create_at", "update_by", "update_at", "is_deleted") VALUES ('68da40b4e47e4743a59c2beac9002dc7', 'b8986770a6ffef44bbf2a9f26d6fc1be', 'fd8166b5005e4d66a77d318f3b1dd5e5', '31f20efc7e0848deab6a6bc10fc3021e', 'Jade', '2025-04-28 08:36:13.767496', 'Jade', '2025-04-28 08:37:15.197182', 0) ON CONFLICT (id) DO NOTHING;
44

app-builder/plugins/knowledge-manager/src/main/resources/sql/data/tr_t_knowledge_config.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ INSERT INTO "public"."store_tag" ("tool_unique_name", "name") VALUES ('aed53a7c-
2424
INSERT INTO "public"."store_tag" ("tool_unique_name", "name") VALUES ('aed53a7c-4701-437b-b651-a5ec298dd0cf', 'KNOWLEDGE') ON CONFLICT ("tool_unique_name", "name") DO NOTHING;
2525
INSERT INTO "public"."store_tag" ("tool_unique_name", "name") VALUES ('4ff18263-7cc1-40fc-bd96-4c0ee9eb3af0', 'APP') ON CONFLICT ("tool_unique_name", "name") DO NOTHING;
2626
INSERT INTO "public"."store_tag" ("tool_unique_name", "name") VALUES ('4ff18263-7cc1-40fc-bd96-4c0ee9eb3af0', 'APP_TYPE_B653EDB7EB5A49BE91ABCD2C5877C6AD') ON CONFLICT ("tool_unique_name", "name") DO NOTHING;
27+
INSERT INTO "public"."store_tag" ("tool_unique_name", "name") VALUES ('4ff18263-7cc1-40fc-bd96-4c0ee9eb3af0', 'BUILTIN') ON CONFLICT ("tool_unique_name", "name") DO NOTHING;
2728

2829
INSERT INTO "public"."store_plugin_tool" ("like_count", "download_count", "tool_name", "plugin_id", "tool_unique_name", "source", "icon", "user_group_id") VALUES (0, 0, '添加知识库配置', '3733674b4180b02ebb49f60193373d38e08753d890d31d41a1ca880cf4364cdd', 'f952e986-a1ee-474d-bd3a-bdf154db58e7', '', NULL, '*') ON CONFLICT ("plugin_id", "tool_unique_name") DO NOTHING;
2930
INSERT INTO "public"."store_plugin_tool" ("like_count", "download_count", "tool_name", "plugin_id", "tool_unique_name", "source", "icon", "user_group_id") VALUES (0, 0, '修改知识库配置', '3733674b4180b02ebb49f60193373d38e08753d890d31d41a1ca880cf4364cdd', '39eea5b4-034a-409a-935a-e9df7736dda8', '', NULL, '*') ON CONFLICT ("plugin_id", "tool_unique_name") DO NOTHING;
@@ -35,7 +36,7 @@ INSERT INTO "public"."store_plugin" ("plugin_id", "plugin_name", "extension", "d
3536

3637
INSERT INTO "public"."app_builder_form" ("id", "name", "tenant_id", "appearance", "type", "create_by", "create_at", "update_by", "update_at", "is_deleted", "form_suite_id", "version", "user_group_id") VALUES ('aed5570845d440c78ed3326f8482483c', '知识库管理表单', '31f20efc7e0848deab6a6bc10fc3021e', '{"imgUrl": "smart_form/17b732c9-5272-42a6-a79d-8d0334a8aa19/form.jpeg", "schema": {"name": "知识库管理表单", "return": {"type": "object", "properties": {"info": {"type": "object", "properties": {"id": {"type": "integer"}, "name": {"type": "string"}, "apiKey": {"type": "string"}, "groupId": {"type": "string"}, "isDefault": {"type": "integer"}}}, "action": {"enum": ["add", "delete", "switch", "quit"], "type": "string"}}}, "parameters": {"type": "object", "required": ["knowledgeList", "knowledgeOptions"], "properties": {"knowledgeList": {"type": "array", "items": {"type": "object", "required": ["groupId", "name", "apiKey", "isDefault"], "properties": {"id": {"type": "integer"}, "name": {"type": "string"}, "apiKey": {"type": "string"}, "userId": {"type": "String"}, "groupId": {"type": "string"}, "isDefault": {"type": "integer"}}}}, "knowledgeOptions": {"type": "array", "items": {"type": "object", "required": ["name", "groupId", "description"], "properties": {"name": {"type": "string"}, "groupId": {"type": "string"}, "description": {"type": "string"}}}}}}}, "fileName": "knowledge.zip", "fileSize": 362092, "fileUuid": "904be596a4b94873b22a008ca807cc3b", "iframeUrl": "smart_form/17b732c9-5272-42a6-a79d-8d0334a8aa19/build/index.html", "description": "这是一个知识库管理表单"}', 'runtime', 'Jade', '2025-04-28 02:04:18.174594', 'Jade', '2025-04-28 14:05:47.721196', 0, '83dc556b25544414b88b538281be4d66', '1.0.0', '*') ON CONFLICT ("id") DO NOTHING;
3738

38-
INSERT INTO "public"."app_builder_app" ("id", "name", "create_by", "create_at", "update_by", "update_at", "config_id", "flow_graph_id", "tenant_id", "type", "version", "attributes", "state", "app_built_type", "app_category", "collection_usr_cnt", "is_deleted", "path", "app_type", "app_suite_id", "is_active", "status", "unique_name", "publish_at", "app_id", "user_group_id") VALUES ('c419cf9d3f2d472da6b376bbb07c0f5a', '知识库配置应用', 'Jade', '2025-04-27 11:38:16.181311', 'Jade', '2025-04-28 14:11:01.841006', 'c9a41dd87eb04b89bbfa6de2b221bb5b', '7075f47449504e639571887473986da6', '31f20efc7e0848deab6a6bc10fc3021e', 'app', '1.0.0', '{"icon": "", "name": "知识库配置应用", "app_type": "b653edb7eb5a49be91abcd2c5877c6ad", "greeting": "", "store_id": "4ff18263-7cc1-40fc-bd96-4c0ee9eb3af0", "is_update": false, "description": "当你想要配置知识库的时候,请使用我!", "publishedUpdateLog": "", "publishedDescription": ""}', 'active', 'workflow', 'chatbot', 0, 0, 'z7hFDTDrjuCUHMn4', 'b653edb7eb5a49be91abcd2c5877c6ad', '5185dad4c8124522a2612c20f8497cf0', 't', 'published', '4ff18263-7cc1-40fc-bd96-4c0ee9eb3af0', '2025-04-28 14:11:19', 'c419cf9d3f2d472da6b376bbb07c0f5a', '*') ON CONFLICT (id) DO NOTHING;
39+
INSERT INTO "public"."app_builder_app" ("id", "name", "create_by", "create_at", "update_by", "update_at", "config_id", "flow_graph_id", "tenant_id", "type", "version", "attributes", "state", "app_built_type", "app_category", "collection_usr_cnt", "is_deleted", "path", "app_type", "app_suite_id", "is_active", "status", "unique_name", "publish_at", "app_id", "user_group_id") VALUES ('c419cf9d3f2d472da6b376bbb07c0f5a', '知识库配置应用', 'system', '2025-04-27 11:38:16.181311', 'system', '2025-04-28 14:11:01.841006', 'c9a41dd87eb04b89bbfa6de2b221bb5b', '7075f47449504e639571887473986da6', '31f20efc7e0848deab6a6bc10fc3021e', 'app', '1.0.0', '{"icon": "", "name": "知识库配置应用", "app_type": "b653edb7eb5a49be91abcd2c5877c6ad", "greeting": "", "store_id": "4ff18263-7cc1-40fc-bd96-4c0ee9eb3af0", "is_update": false, "description": "当你想要配置知识库的时候,请使用我!", "publishedUpdateLog": "", "publishedDescription": ""}', 'active', 'workflow', 'chatbot', 0, 0, 'z7hFDTDrjuCUHMn4', 'b653edb7eb5a49be91abcd2c5877c6ad', '5185dad4c8124522a2612c20f8497cf0', 't', 'published', '4ff18263-7cc1-40fc-bd96-4c0ee9eb3af0', '2025-04-28 14:11:19', 'c419cf9d3f2d472da6b376bbb07c0f5a', '*') ON CONFLICT (id) DO NOTHING;
3940

4041
INSERT INTO "public"."app_builder_config" ("id", "form_id", "app_id", "tenant_id", "create_by", "create_at", "update_by", "update_at", "is_deleted") VALUES ('c9a41dd87eb04b89bbfa6de2b221bb5b', 'b8986770a6ffef44bbf2a9f26d6fc1be', 'c419cf9d3f2d472da6b376bbb07c0f5a', '31f20efc7e0848deab6a6bc10fc3021e', 'Jade', '2025-04-27 11:38:16.181311', 'Jade', '2025-04-28 14:11:01.841006', 0) ON CONFLICT (id) DO NOTHING;
4142

app-builder/plugins/plugins-show-case-parent/aito-data/src/main/resources/sql/data/tr_t_wenjie.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
INSERT INTO "public"."app_builder_app" ("id", "name", "create_by", "create_at", "update_by", "update_at", "config_id", "flow_graph_id", "tenant_id", "type", "version", "attributes", "state", "app_built_type", "app_category", "collection_usr_cnt", "is_deleted", "path", "app_type", "app_suite_id", "is_active", "status", "unique_name", "publish_at", "app_id", "user_group_id") VALUES ('550177e8d0e34014a2d95988ef1c67c5', '问界试驾助手', 'Jade', '2025-04-19 09:08:09.532855', 'Jade', '2025-04-19 09:15:37.326128', '2aee7721a4fb46b3b0a789f9037b040d', '5711f3230eb94abdb168e61d2082d1d2', '31f20efc7e0848deab6a6bc10fc3021e', 'app', '1.0.0', '{"icon": "", "name": "问界试驾助手", "greeting": "", "store_id": "2a3141b2-8c83-40c2-b2b6-103746c125d3", "is_update": false, "description": "", "publishedUpdateLog": "", "publishedDescription": "问界试驾助手"}', 'active', 'workflow', 'chatbot', 0, 0, 'pTTfcIHbWg8gW0sK', '4db152b24f94473ab683b1acbfe3c865', 'dfe319109bc84f6793645e3483c029ca', 't', 'published', '2a3141b2-8c83-40c2-b2b6-103746c125d3', '2025-04-19 09:15:56', '550177e8d0e34014a2d95988ef1c67c5', '*') ON CONFLICT (id) DO NOTHING;
1+
INSERT INTO "public"."app_builder_app" ("id", "name", "create_by", "create_at", "update_by", "update_at", "config_id", "flow_graph_id", "tenant_id", "type", "version", "attributes", "state", "app_built_type", "app_category", "collection_usr_cnt", "is_deleted", "path", "app_type", "app_suite_id", "is_active", "status", "unique_name", "publish_at", "app_id", "user_group_id") VALUES ('550177e8d0e34014a2d95988ef1c67c5', '问界试驾助手', 'system', '2025-04-19 09:08:09.532855', 'system', '2025-04-19 09:15:37.326128', '2aee7721a4fb46b3b0a789f9037b040d', '5711f3230eb94abdb168e61d2082d1d2', '31f20efc7e0848deab6a6bc10fc3021e', 'app', '1.0.0', '{"icon": "", "name": "问界试驾助手", "greeting": "", "store_id": "2a3141b2-8c83-40c2-b2b6-103746c125d3", "is_update": false, "description": "", "publishedUpdateLog": "", "publishedDescription": "问界试驾助手"}', 'active', 'workflow', 'chatbot', 0, 0, 'pTTfcIHbWg8gW0sK', '4db152b24f94473ab683b1acbfe3c865', 'dfe319109bc84f6793645e3483c029ca', 't', 'published', '2a3141b2-8c83-40c2-b2b6-103746c125d3', '2025-04-19 09:15:56', '550177e8d0e34014a2d95988ef1c67c5', '*') ON CONFLICT (id) DO NOTHING;
22

33
INSERT INTO "public"."app_builder_config" ("id", "form_id", "app_id", "tenant_id", "create_by", "create_at", "update_by", "update_at", "is_deleted") VALUES ('2aee7721a4fb46b3b0a789f9037b040d', 'b8986770a6ffef44bbf2a9f26d6fc1be', '550177e8d0e34014a2d95988ef1c67c5', '31f20efc7e0848deab6a6bc10fc3021e', 'Jade', '2025-04-19 09:08:09.532855', 'Jade', '2025-04-19 09:15:37.326128', 0) ON CONFLICT (id) DO NOTHING;
44

frontend/src/pages/apps/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ const Apps: React.FC = () => {
3535
pageNum: page,
3636
pageSize,
3737
includeTags: 'APP',
38-
name: search
38+
name: search,
39+
excludeTags: 'BUILTIN'
3940
};
4041
setListLoading(true);
4142
try {

frontend/src/pages/chatPreview/components/send-editor/components/referencing-app.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ const ReferencingApp = (props) => {
3636
pageNum: pageNo.current,
3737
pageSize: 3,
3838
includeTags: 'App',
39-
name: searchKey
39+
name: searchKey,
40+
excludeTags: 'BUILTIN'
4041
}
4142
const res = await queryAppsApi(tenantId, params);
4243
if (res.code === 0) {

store/plugins/store-repository-postgresql/src/main/resources/mapper/AppMapper.xml

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,39 @@
5454
group by t."tool_unique_name") tg on i."tool_unique_name" = tg."tool_unique_name"
5555
</sql>
5656
<sql id="getOrSearchConditions">
57-
<if test="mode == 'AND' and includeTags != null and includeTags.size() > 0">
57+
<if test="mode == 'AND'">
5858
and tg.tags is not null
59-
and (
60-
<foreach collection="includeTags" item="tag" open="" close="" separator=" and ">
61-
tg.tags ~ ('(^|,)' || #{tag} || '($|,)')
62-
</foreach>
63-
)
59+
<if test="includeTags != null and includeTags.size() > 0">
60+
and (
61+
<foreach collection="includeTags" item="tag" open="" close="" separator=" and ">
62+
tg.tags ~ ('(^|,)' || #{tag} || '($|,)')
63+
</foreach>
64+
)
65+
</if>
66+
<if test="excludeTags != null and excludeTags.size() > 0">
67+
and not (
68+
<foreach collection="excludeTags" item="tag" open="" close="" separator=" and ">
69+
tg.tags ~ ('(^|,)' || #{tag} || '($|,)')
70+
</foreach>
71+
)
72+
</if>
6473
</if>
65-
<if test="mode == 'OR' and excludeTags != null and excludeTags.size() > 0">
74+
<if test="mode == 'OR'">
6675
and ( tg.tags is null
67-
or not (
68-
<foreach collection="excludeTags" item="tag" open="" close="" separator=" or ">
69-
tg.tags ~ ('(^|,)' || #{tag} || '($|,)')
70-
</foreach>
71-
)
76+
<if test="includeTags != null and includeTags.size() > 0">
77+
or (
78+
<foreach collection="includeTags" item="tag" open="" close="" separator=" or ">
79+
tg.tags ~ ('(^|,)' || #{tag} || '($|,)')
80+
</foreach>
81+
)
82+
</if>
83+
<if test="excludeTags != null and excludeTags.size() > 0">
84+
or not (
85+
<foreach collection="excludeTags" item="tag" open="" close="" separator=" or ">
86+
tg.tags ~ ('(^|,)' || #{tag} || '($|,)')
87+
</foreach>
88+
)
89+
</if>
7290
)
7391
</if>
7492
</sql>

0 commit comments

Comments
 (0)