Ver Fonte

feat:达人会员通过电话搜索问题

caoliqin há 1 semana atrás
pai
commit
fe3301727b

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

@@ -342,6 +342,7 @@ public class FsUserController extends BaseController
     public R listBySearch(FsUser user)
     {
         if (Objects.nonNull(user) && StringUtils.isNotBlank(user.getPhone())){
+            user.setPhoneUnencrypted(user.getPhone());
             user.setPhone(PhoneUtil.encryptPhone(user.getPhone()));
         }
         List<FsUser> list = fsUserService.selectFsUserList(user);

+ 4 - 0
fs-service/src/main/java/com/fs/his/domain/FsUser.java

@@ -43,6 +43,10 @@ public class FsUser extends BaseEntity
     /** 手机号码 */
     @Excel(name = "手机号码")
     private String phone;
+
+    /** 不加密手机号 */
+    private String phoneUnencrypted;
+
     private BigDecimal nowMoney;
     private BigDecimal brokeragePrice;
 

+ 3 - 1
fs-service/src/main/resources/mapper/his/FsUserMapper.xml

@@ -62,7 +62,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userId != null">and user_id = #{userId}</if>
             <if test="nickName != null  and nickName != ''"> and nick_name like concat( #{nickName}, '%')</if>
             <if test="avatar != null  and avatar != ''"> and avatar = #{avatar}</if>
-            <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
+            <if test="phone != null  and phone != '' and phoneUnencrypted != null and phoneUnencrypted != ''">
+                and (phone = #{phone} or phone = #{phoneUnencrypted})
+            </if>
             <if test="integral != null "> and integral = #{integral}</if>
             <if test="signNum != null "> and sign_num = #{signNum}</if>
             <if test="status != null "> and status = #{status}</if>