Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
bef4eb97
Commit
bef4eb97
authored
Apr 18, 2025
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-档案更新优化
parent
6d784999
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
93 deletions
+29
-93
TEmployeeProjectMapper.xml
...-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
+14
-41
SysUserMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
+15
-52
No files found.
yifu-archives/yifu-archives-biz/src/main/resources/mapper/TEmployeeProjectMapper.xml
View file @
bef4eb97
...
...
@@ -710,47 +710,20 @@
</insert>
<update
id=
"updateReduceEmpProject"
parameterType=
"java.util.List"
>
update t_employee_project
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"EMP_LABEL =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
when ID=#{i.id} then #{i.empLabel}
</foreach>
</trim>
<trim
prefix=
"LEAVE_TIME =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
when ID=#{i.id} then now()
</foreach>
</trim>
<trim
prefix=
"LEAVE_REASON =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.leaveReason!=null"
>
when ID=#{i.id} then #{i.leaveReason}
</if>
</foreach>
</trim>
<trim
prefix=
"LEAVE_USER =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.leaveUser!=null"
>
when ID=#{i.id} then #{i.leaveUser}
</if>
</foreach>
</trim>
<trim
prefix=
"LEAVE_REMARK =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.leaveRemark!=null"
>
when ID=#{i.id} then #{i.leaveRemark}
</if>
</foreach>
</trim>
<trim
prefix=
"PROJECT_STATUS =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
when ID=#{i.id} then 1
</foreach>
</trim>
</trim>
where
<foreach
collection=
"list"
separator=
"or"
item=
"i"
index=
"index"
>
ID=#{i.id}
<set>
<foreach
collection=
"list"
item=
"i"
separator=
","
>
EMP_LABEL = COALESCE(#{i.empLabel}, EMP_LABEL),
PROJECT_STATUS = 1,
LEAVE_TIME = now(),
LEAVE_REASON = COALESCE(#{i.leaveReason}, LEAVE_REASON),
LEAVE_USER = COALESCE(#{i.leaveUser}, LEAVE_USER),
LEAVE_REMARK = COALESCE(#{i.leaveRemark}, LEAVE_REMARK)
</foreach>
</set>
where id in
<foreach
item=
"i"
index=
"index"
collection=
"list"
open=
"("
separator=
","
close=
")"
>
#{i.id}
</foreach>
</update>
<!--查询部门编码和最大员工数-->
...
...
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysUserMapper.xml
View file @
bef4eb97
...
...
@@ -233,58 +233,21 @@
<update
id=
"batchUpdateUser"
parameterType=
"java.util.List"
>
update sys_user
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"phone =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.telephoneNumber!=null"
>
when username=#{i.uid} then #{i.telephoneNumber}
</if>
</foreach>
</trim>
<trim
prefix=
"email =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.email!=null"
>
when username=#{i.uid} then #{i.email}
</if>
</foreach>
</trim>
<trim
prefix=
"nickname =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.personName!=null"
>
when username=#{i.uid} then #{i.personName}
</if>
</foreach>
</trim>
<trim
prefix=
"password =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.password!=null"
>
when username=#{i.uid} then #{i.password}
</if>
</foreach>
</trim>
<trim
prefix=
"update_time =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
when username=#{i.uid} then now()
</foreach>
</trim>
<trim
prefix=
"dept_id =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.deptId!=null"
>
when username=#{i.uid} then #{i.deptId}
</if>
</foreach>
</trim>
<trim
prefix=
"dept_name =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"i"
index=
"index"
>
<if
test=
"i.deptName!=null"
>
when username=#{i.uid} then #{i.deptName}
</if>
</foreach>
</trim>
</trim>
where
<foreach
collection=
"list"
separator=
"or"
item=
"i"
index=
"index"
>
username=#{i.uid}
<set>
<foreach
collection=
"list"
item=
"i"
separator=
","
>
phone = COALESCE(#{i.telephoneNumber}, phone),
update_time = now(),
email = COALESCE(#{i.email}, email),
nickname = COALESCE(#{i.personName}, nickname),
password = COALESCE(#{i.password}, password),
dept_id = COALESCE(#{i.deptId}, dept_id),
dept_name = COALESCE(#{i.deptName}, dept_name)
</foreach>
</set>
where username in
<foreach
item=
"i"
index=
"index"
collection=
"list"
open=
"("
separator=
","
close=
")"
>
#{i.uid}
</foreach>
</update>
...
...
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