优化微信用户优化名
This commit is contained in:
@@ -166,11 +166,13 @@ public class AppAuthService {
|
|||||||
//过滤掉表情
|
//过滤掉表情
|
||||||
String ip = co.yixiang.app.common.util.IpUtil.getRequestIp();
|
String ip = co.yixiang.app.common.util.IpUtil.getRequestIp();
|
||||||
yxUser = YxUser.builder()
|
yxUser = YxUser.builder()
|
||||||
.username(phoneNoInfo.getPhoneNumber())
|
.username(StringUtils.isNotBlank(phoneNoInfo.getPhoneNumber())?phoneNoInfo.getPhoneNumber():session.getOpenid())
|
||||||
|
// .username(phoneNoInfo.getPhoneNumber())
|
||||||
.phone(phoneNoInfo.getPhoneNumber())
|
.phone(phoneNoInfo.getPhoneNumber())
|
||||||
.addIp(ip)
|
.addIp(ip)
|
||||||
.openId(session.getOpenid())
|
.openId(session.getOpenid())
|
||||||
.lastIp(ip)
|
.lastIp(ip)
|
||||||
|
.nickname(StringUtils.isNotBlank(phoneNoInfo.getPhoneNumber())?phoneNoInfo.getPhoneNumber():session.getOpenid())
|
||||||
.userType(AppFromEnum.ROUNTINE.getValue())
|
.userType(AppFromEnum.ROUNTINE.getValue())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|||||||
+1
@@ -103,6 +103,7 @@ public class WxMaUserController {
|
|||||||
phone = phoneNoInfo.getPhoneNumber();
|
phone = phoneNoInfo.getPhoneNumber();
|
||||||
|
|
||||||
user.setPhone(phone);
|
user.setPhone(phone);
|
||||||
|
user.setUsername(phone);//默认没绑手机号的用户username是openId,绑定手机号时候也修改为手机号
|
||||||
userService.updateById(user);
|
userService.updateById(user);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ public class StoreProductController {
|
|||||||
String newHtml = "";
|
String newHtml = "";
|
||||||
Map<String,Object> map = new HashMap<>();
|
Map<String,Object> map = new HashMap<>();
|
||||||
newHtml = String.join("", Collections.nCopies(1,html));
|
newHtml = String.join("", Collections.nCopies(1,html));
|
||||||
//为了前端级联选择器好显示,这里分类名也字段名为storeName
|
//为了前端级联选择器好显示,这里分类名也将字段名改为storeName
|
||||||
map.put("id",yxStoreCategory.getId());
|
map.put("id",yxStoreCategory.getId());
|
||||||
map.put("storeName",newHtml + yxStoreCategory.getCateName());
|
map.put("storeName",newHtml + yxStoreCategory.getCateName());
|
||||||
List<YxStoreProduct> list=yxStoreProductService.lambdaQuery()
|
List<YxStoreProduct> list=yxStoreProductService.lambdaQuery()
|
||||||
|
|||||||
Reference in New Issue
Block a user