From c424bc0ca810fddb7bf36ace1fc649c3697158fb Mon Sep 17 00:00:00 2001 From: sj <1304317391@qq.com> Date: Tue, 15 Nov 2022 13:50:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BE=AE=E4=BF=A1=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BC=98=E5=8C=96=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/co/yixiang/app/modules/services/AppAuthService.java | 4 +++- .../modules/wechat/rest/controller/WxMaUserController.java | 1 + .../yixiang/modules/product/rest/StoreProductController.java | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/zsw-bxg/src/main/java/co/yixiang/app/modules/services/AppAuthService.java b/zsw-bxg/src/main/java/co/yixiang/app/modules/services/AppAuthService.java index c416594d..d3c41bea 100644 --- a/zsw-bxg/src/main/java/co/yixiang/app/modules/services/AppAuthService.java +++ b/zsw-bxg/src/main/java/co/yixiang/app/modules/services/AppAuthService.java @@ -166,11 +166,13 @@ public class AppAuthService { //过滤掉表情 String ip = co.yixiang.app.common.util.IpUtil.getRequestIp(); yxUser = YxUser.builder() - .username(phoneNoInfo.getPhoneNumber()) + .username(StringUtils.isNotBlank(phoneNoInfo.getPhoneNumber())?phoneNoInfo.getPhoneNumber():session.getOpenid()) +// .username(phoneNoInfo.getPhoneNumber()) .phone(phoneNoInfo.getPhoneNumber()) .addIp(ip) .openId(session.getOpenid()) .lastIp(ip) + .nickname(StringUtils.isNotBlank(phoneNoInfo.getPhoneNumber())?phoneNoInfo.getPhoneNumber():session.getOpenid()) .userType(AppFromEnum.ROUNTINE.getValue()) .build(); diff --git a/zsw-bxg/src/main/java/co/yixiang/app/modules/wechat/rest/controller/WxMaUserController.java b/zsw-bxg/src/main/java/co/yixiang/app/modules/wechat/rest/controller/WxMaUserController.java index 898645c3..8093ec9d 100644 --- a/zsw-bxg/src/main/java/co/yixiang/app/modules/wechat/rest/controller/WxMaUserController.java +++ b/zsw-bxg/src/main/java/co/yixiang/app/modules/wechat/rest/controller/WxMaUserController.java @@ -103,6 +103,7 @@ public class WxMaUserController { phone = phoneNoInfo.getPhoneNumber(); user.setPhone(phone); + user.setUsername(phone);//默认没绑手机号的用户username是openId,绑定手机号时候也修改为手机号 userService.updateById(user); } catch (Exception e) { e.printStackTrace(); diff --git a/zsw-bxg/src/main/java/co/yixiang/modules/product/rest/StoreProductController.java b/zsw-bxg/src/main/java/co/yixiang/modules/product/rest/StoreProductController.java index c44fb568..9f8070a8 100644 --- a/zsw-bxg/src/main/java/co/yixiang/modules/product/rest/StoreProductController.java +++ b/zsw-bxg/src/main/java/co/yixiang/modules/product/rest/StoreProductController.java @@ -126,7 +126,7 @@ public class StoreProductController { String newHtml = ""; Map map = new HashMap<>(); newHtml = String.join("", Collections.nCopies(1,html)); - //为了前端级联选择器好显示,这里分类名也字段名为storeName + //为了前端级联选择器好显示,这里分类名也将字段名改为storeName map.put("id",yxStoreCategory.getId()); map.put("storeName",newHtml + yxStoreCategory.getCateName()); List list=yxStoreProductService.lambdaQuery()