Browse Source

feat:会员管理根据电话查询优化

caoliqin 1 week ago
parent
commit
40b6c3e8f3

+ 1 - 1
fs-admin/src/main/java/com/fs/his/controller/FsUserController.java

@@ -99,7 +99,7 @@ public class FsUserController extends BaseController
             fsUser.setPhone(encryptPhone(fsUser.getPhoneMk()));
         }
         if(StringUtils.isNotEmpty(fsUser.getPhone())){
-            fsUser.setPhone(encryptPhone(fsUser.getPhone()));
+            fsUser.setEncryptPhone(encryptPhone(fsUser.getPhone()));
         }
         List<FsUserVO> list = fsUserService.selectFsUserListVO(fsUser);
         SysRole sysRole = isCheckPermission();

+ 1 - 1
fs-service/src/main/java/com/fs/his/mapper/FsUserMapper.java

@@ -86,7 +86,7 @@ public interface FsUserMapper
             " where f1.is_del=0 "+
             "  <if test=\"nickName != null  and nickName != ''\"> and f1.nick_name like concat( #{nickName}, '%')</if>\n" +
             "            <if test=\"avatar != null  and avatar != ''\"> and f1.avatar = #{avatar}</if>\n" +
-            "            <if test=\"phone != null  and phone != ''\"> and f1.phone like concat('%', #{phone}, '%')</if>\n" +
+            "            <if test=\"phone != null  and phone != ''\"> and (f1.phone like concat('%', #{phone}, '%') or f1.phone = #{encryptPhone} ) </if>\n" +
             "            <if test=\"status != null \"> and f1.status = #{status}</if>\n" +
             "            <if test=\"isBuy != null \"> and f1.is_buy = #{isBuy}</if>\n" +
             "            <if test=\"userId != null \"> and f1.user_id = #{userId}</if>\n" +

+ 3 - 0
fs-service/src/main/java/com/fs/his/param/FsUserParam.java

@@ -78,4 +78,7 @@ public class FsUserParam {
     private String loginDevice;//当前登录设备
 
     private String source;
+
+    /** 加密的手机号码-用于查询 */
+    private String encryptPhone;
 }