员工异步导入
This commit is contained in:
@@ -44,7 +44,7 @@
|
||||
ORDER BY e.create_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 批量插入或更新员工信息 -->
|
||||
<!-- 批量插入或更新员工信息(只更新非null字段) -->
|
||||
<insert id="insertOrUpdateBatch" parameterType="java.util.List">
|
||||
INSERT INTO ccdi_employee
|
||||
(employee_id, name, dept_id, id_card, phone, hire_date, status,
|
||||
@@ -56,13 +56,12 @@
|
||||
#{item.createBy}, #{item.updateBy}, NOW())
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
name = VALUES(name),
|
||||
dept_id = VALUES(dept_id),
|
||||
id_card = VALUES(id_card),
|
||||
phone = VALUES(phone),
|
||||
hire_date = VALUES(hire_date),
|
||||
status = VALUES(status),
|
||||
update_by = VALUES(update_by),
|
||||
name = COALESCE(VALUES(name), name),
|
||||
dept_id = COALESCE(VALUES(dept_id), dept_id),
|
||||
phone = COALESCE(VALUES(phone), phone),
|
||||
hire_date = COALESCE(VALUES(hire_date), hire_date),
|
||||
status = COALESCE(VALUES(status), status),
|
||||
update_by = COALESCE(VALUES(update_by), update_by),
|
||||
update_time = NOW()
|
||||
</insert>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user