Browse Source

【#4127】sql漏洞写法修复

pull/4246/merge
zhangdaiscott 2 years ago
parent
commit
958cf01649
  1. 8
      jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml

8
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml

@ -159,7 +159,13 @@
<!-- 更新空字符串为null --> <!-- 更新空字符串为null -->
<update id="updateNullByEmptyString"> <update id="updateNullByEmptyString">
UPDATE sys_user SET ${fieldName} = NULL WHERE ${fieldName} = '' UPDATE sys_user
<if test="fieldName == 'email'">
SET email = NULL WHERE email = ''
</if>
<if test="fieldName == 'phone'">
SET phone = NULL WHERE phone = ''
</if>
</update> </update>
<!-- 通过多个部门IDS,查询部门下的用户信息 --> <!-- 通过多个部门IDS,查询部门下的用户信息 -->

Loading…
Cancel
Save