Commit 6355a79f by zhouhaibao

feat(auth): 添加登录图形验证码并修复SQL注入漏洞

- 新增获取登录图形验证码接口 dj.api.user.getVerifyCode
- 登录流程增加验证码校验逻辑,支持通过配置开关控制
- 验证码使用 Redis 缓存,一次性使用,取出后立即删除
- 新增 LoginRequest 中 code 和 codeToken 字段
- 修复 CustomerMergeMapper 中 LIKE 查询的 SQL 注入漏洞,将 ${} 替换为 #{params}
1 parent e7ad7fdf
......@@ -149,7 +149,7 @@
</if>
<!--客户名称-->
<if test="customerName != null and customerName !=''">
AND scm.customer_name like '%${customerName}%'
AND scm.customer_name like concat('%', #{customerName}, '%')
</if>
<!--当前状态-->
<if test="status != null">
......@@ -161,7 +161,7 @@
</if>
<!--手机号-->
<if test="customerPhone != null and customerPhone !=''">
AND scm.customer_phone like '%${customerPhone}%'
AND scm.customer_phone like concat('%', #{customerPhone}, '%')
</if>
<!--是否已加企微 1.加入 0.未加入-->
<if test="isJoin != null">
......@@ -169,7 +169,7 @@
</if>
<!--跟进员工-->
<if test="followStaff != null and followStaff !=''">
and es.staff_name like '%${followStaff}%' and ecf.del_flag = 0
and es.staff_name like concat('%', #{followStaff}, '%') and ecf.del_flag = 0
</if>
<!--来源-->
<if test="addWay != null">
......@@ -260,7 +260,7 @@
</if>
<!--客户名称-->
<if test="customerName != null and customerName !=''">
AND scm.customer_name like '%${customerName}%'
AND scm.customer_name like concat('%', #{customerName}, '%')
</if>
<!--当前状态-->
<if test="status != null">
......@@ -272,7 +272,7 @@
</if>
<!--手机号-->
<if test="customerPhone != null and customerPhone !=''">
AND scm.customer_phone like '%${customerPhone}%'
AND scm.customer_phone like concat('%', #{customerPhone}, '%')
</if>
<!--是否已加企微 1.加入 0.未加入-->
<if test="isJoin != null">
......@@ -563,7 +563,7 @@
</if>
<!--跟进员工-->
<if test="followStaff != null and followStaff !=''">
and es.staff_name like '%${followStaff}%' and ecf.del_flag = 0
and es.staff_name like concat('%', #{followStaff}, '%') and ecf.del_flag = 0
</if>
<!--来源-->
<if test="addWay != null">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!