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
62616758
Commit
62616758
authored
Jan 08, 2026
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf(database): 优化机构监管信息批量更新SQL性能
- 将批量更新语句从循环执行改为单次批量更新 - 使用FROM子句和VALUES构造临时表进行批量操作 - 减少数据库交互次数提升更新效率
parent
c9772102
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
IdxBizJgSupervisionInfoMapper.xml
...c/main/resources/mapper/IdxBizJgSupervisionInfoMapper.xml
+10
-3
No files found.
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/IdxBizJgSupervisionInfoMapper.xml
View file @
62616758
...
@@ -2,9 +2,16 @@
...
@@ -2,9 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgSupervisionInfoMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.ymt.api.mapper.IdxBizJgSupervisionInfoMapper"
>
<update
id=
"updateOrgBranchCodeBatch"
>
<update
id=
"updateOrgBranchCodeBatch"
>
<foreach
collection=
"dtos"
separator=
";"
item=
"dto"
open=
""
close=
""
>
UPDATE idx_biz_jg_supervision_info SET
UPDATE idx_biz_jg_supervision_info SET "ORG_BRANCH_CODE"=#{dto.orgBranchCode}, "ORG_BRANCH_NAME"=#{dto.ORG_BRANCH_NAME} WHERE record = #{dto.SEQUENCE_NBR}
"ORG_BRANCH_CODE" = temp_table."ORG_BRANCH_CODE",
</foreach>
"ORG_BRANCH_NAME" = temp_table."ORG_BRANCH_NAME"
FROM (
VALUES
<foreach
collection=
"dtos"
separator=
","
item=
"dto"
index=
"index"
>
(#{dto.orgBranchCode}, #{dto.ORG_BRANCH_NAME}, #{dto.SEQUENCE_NBR})
</foreach>
) AS temp_table("ORG_BRANCH_CODE", "ORG_BRANCH_NAME", "RECORD")
WHERE idx_biz_jg_supervision_info."RECORD" = temp_table."RECORD"
</update>
</update>
</mapper>
</mapper>
...
...
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