diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserInfoController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserInfoController.java index c360c85fa..be3f4791f 100644 --- a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserInfoController.java +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserInfoController.java @@ -13,6 +13,7 @@ import com.stdiet.custom.domain.SysWxUserLog; import com.stdiet.custom.page.WxServeInfo; import com.stdiet.custom.service.ISysOrderService; import com.stdiet.custom.service.ISysWxUserInfoService; +import org.aspectj.weaver.loadtime.Aj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; @@ -141,4 +142,17 @@ public class SysWxUserInfoController extends BaseController { return AjaxResult.success(wxServeInfo); } + + @GetMapping("/wx/user/list") + public AjaxResult userList(SysWxUserInfo sysWxUserInfo) { + startPage(); + List<SysWxUserInfo> list = sysWxUserInfoService.selectSysWxUserInfoList(sysWxUserInfo); + + for (SysWxUserInfo userInfo : list) { + if (StringUtils.isNotEmpty(userInfo.getPhone())) { + userInfo.setPhone(userInfo.getPhone().replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2")); + } + } + return AjaxResult.success(list); + } } \ No newline at end of file diff --git a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserLogController.java b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserLogController.java index 959ae2e85..49c70453c 100644 --- a/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserLogController.java +++ b/stdiet-admin/src/main/java/com/stdiet/web/controller/custom/SysWxUserLogController.java @@ -108,6 +108,7 @@ public class SysWxUserLogController extends BaseController { @GetMapping(value = "/wx/logs/list") public AjaxResult getLogs(SysWxUserLog sysWxUserLog) { + System.out.println(sysWxUserLog.toString()); List<WxLogInfo> list = sysWxUserLogService.selectWxLogInfoList(sysWxUserLog); return AjaxResult.success(list); } diff --git a/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml b/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml index 943d4879d..c22964621 100644 --- a/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml +++ b/stdiet-custom/src/main/resources/mapper/custom/SysWxUserLogMapper.xml @@ -49,7 +49,7 @@ <select id="selectSysWxUserLogList" parameterType="SysWxUserLog" resultMap="SysWxUserLogResult"> <include refid="selectSysWxUserLogVo"/> <where> - <if test="appid != null and appid != ''"> and appid = #{appid}</if> + <if test="openid != null and openid != ''"> and openid = #{openid}</if> <if test="phone != null and phone != ''"> and phone = #{phone}</if> </where> order by create_time desc @@ -58,7 +58,7 @@ <select id="selectWxLogInfoList" parameterType="SysWxUserLog" resultMap="WxLogInfo"> <include refid="selectSysWxUserLogVo"/> <where> - <if test="appid != null and appid != ''"> and appid = #{appid}</if> + <if test="openid != null and openid != ''"> and openid = #{openid}</if> <if test="phone != null and phone != ''"> and phone = #{phone}</if> </where> order by create_time asc