Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
232e04dc
Commit
232e04dc
authored
Sep 02, 2025
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf(amos-boot): 使用 STRING_AGG 替代 GROUP_CONCAT- 将 GROUP_CONCAT 函数替换为 STRING_AGG…
perf(amos-boot): 使用 STRING_AGG 替代 GROUP_CONCAT- 将 GROUP_CONCAT 函数替换为 STRING_AGG 函数- 优化查询性能,特别是在处理大量数据时
parent
3cc1add8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
JgUseRegistrationMapper.xml
...api/src/main/resources/mapper/JgUseRegistrationMapper.xml
+11
-11
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/resources/mapper/JgUseRegistrationMapper.xml
View file @
232e04dc
...
...
@@ -499,17 +499,17 @@
fu.project_contraption_id AS projectContraptionId,
(select company_name from privilege_company where org_code = fu.supervision_org_code and is_deleted = false limit 1) AS orgBranchName,
COALESCE(
GROUP_CONCAT
(DISTINCT re.equ_id), '') AS equipId,
COALESCE(
GROUP_CONCAT
(DISTINCT other.supervisory_code), '') AS supervisoryCode,
COALESCE(
GROUP_CONCAT
(DISTINCT other.CODE96333), '') AS code96333,
COALESCE(
GROUP_CONCAT
(DISTINCT jri.PRODUCT_NAME), '') AS productName,
COALESCE(
GROUP_CONCAT
(DISTINCT jri.EQU_CODE), '') AS equCode,
COALESCE(
GROUP_CONCAT
(DISTINCT jri.EQU_LIST), '') AS equListCode,
COALESCE(
GROUP_CONCAT
(DISTINCT jri.EQU_CATEGORY), '') AS equCategoryCode,
COALESCE(
GROUP_CONCAT
(DISTINCT jri.EQU_DEFINE), '') AS equDefineCode,
COALESCE(
GROUP_CONCAT
(DISTINCT c_list.name), '') AS equListName,
COALESCE(
GROUP_CONCAT
(DISTINCT c_cate.name), '') AS equCategory,
COALESCE(
GROUP_CONCAT
(DISTINCT c_def.name), '') AS equDefine
COALESCE(
STRING_AGG
(DISTINCT re.equ_id), '') AS equipId,
COALESCE(
STRING_AGG
(DISTINCT other.supervisory_code), '') AS supervisoryCode,
COALESCE(
STRING_AGG
(DISTINCT other.CODE96333), '') AS code96333,
COALESCE(
STRING_AGG
(DISTINCT jri.PRODUCT_NAME), '') AS productName,
COALESCE(
STRING_AGG
(DISTINCT jri.EQU_CODE), '') AS equCode,
COALESCE(
STRING_AGG
(DISTINCT jri.EQU_LIST), '') AS equListCode,
COALESCE(
STRING_AGG
(DISTINCT jri.EQU_CATEGORY), '') AS equCategoryCode,
COALESCE(
STRING_AGG
(DISTINCT jri.EQU_DEFINE), '') AS equDefineCode,
COALESCE(
STRING_AGG
(DISTINCT c_list.name), '') AS equListName,
COALESCE(
STRING_AGG
(DISTINCT c_cate.name), '') AS equCategory,
COALESCE(
STRING_AGG
(DISTINCT c_def.name), '') AS equDefine
FROM filtered_main_ids fm
JOIN tzs_jg_use_registration fu ON fm.sequence_nbr = fu.sequence_nbr
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment