fix: 修正importPersonBatch SQL的UPSERT逻辑

- 添加person_id字段到UPDATE部分,支持身份证号更新
- 修正gender枚举字段的空字符串判断,移除不必要的空字符串检查

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
wkc
2026-02-08 16:06:36 +08:00
parent 2f3ad08813
commit de3f1abb09

View File

@@ -72,8 +72,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
ON DUPLICATE KEY UPDATE
name = IF(VALUES(name) IS NOT NULL AND VALUES(name) != '', VALUES(name), name),
gender = IF(VALUES(gender) IS NOT NULL AND VALUES(gender) != '', VALUES(gender), gender),
gender = IF(VALUES(gender) IS NOT NULL, VALUES(gender), gender),
id_type = IF(VALUES(id_type) IS NOT NULL AND VALUES(id_type) != '', VALUES(id_type), id_type),
person_id = IF(VALUES(person_id) IS NOT NULL AND VALUES(person_id) != '', VALUES(person_id), person_id),
mobile = IF(VALUES(mobile) IS NOT NULL AND VALUES(mobile) != '', VALUES(mobile), mobile),
wechat_no = IF(VALUES(wechat_no) IS NOT NULL AND VALUES(wechat_no) != '', VALUES(wechat_no), wechat_no),
contact_address = IF(VALUES(contact_address) IS NOT NULL AND VALUES(contact_address) != '', VALUES(contact_address), contact_address),