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()