修改数据查询接口

This commit is contained in:
huangdeliang 2020-12-09 22:34:20 +08:00
parent f8010e8001
commit cb96869cce
2 changed files with 46 additions and 39 deletions

View File

@ -148,11 +148,11 @@ public class SysWxUserInfoController extends BaseController {
startPage(); startPage();
List<SysWxUserInfo> list = sysWxUserInfoService.selectSysWxUserInfoListNot(sysWxUserInfo); List<SysWxUserInfo> list = sysWxUserInfoService.selectSysWxUserInfoListNot(sysWxUserInfo);
for (SysWxUserInfo userInfo : list) { // for (SysWxUserInfo userInfo : list) {
if (StringUtils.isNotEmpty(userInfo.getPhone())) { // if (StringUtils.isNotEmpty(userInfo.getPhone())) {
userInfo.setPhone(userInfo.getPhone().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2")); // userInfo.setPhone(userInfo.getPhone().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2"));
} // }
} // }
return getDataTable(list); return getDataTable(list);
} }
} }

View File

@ -56,10 +56,17 @@
</select> </select>
<select id="selectWxLogInfoList" parameterType="SysWxUserLog" resultMap="WxLogInfo"> <select id="selectWxLogInfoList" parameterType="SysWxUserLog" resultMap="WxLogInfo">
<include refid="selectSysWxUserLogVo"/> SELECT * FROM sys_wx_user_log log
<where> <where>
<choose>
<when test="phone == null or phone == ''">
(SELECT phone FROM sys_wx_user_info WHERE openid = #{openid}) = log.phone
</when>
<otherwise>
<if test="openid != null and openid != ''">and openid = #{openid}</if> <if test="openid != null and openid != ''">and openid = #{openid}</if>
<if test="phone != null and phone != ''">or phone = #{phone}</if> <if test="phone != null and phone != ''">or phone = #{phone}</if>
</otherwise>
</choose>
</where> </where>
order by log_time asc order by log_time asc
</select> </select>