|
@@ -287,8 +287,12 @@ public class UserLogic {
|
|
public void userTypeInit(User user) {
|
|
public void userTypeInit(User user) {
|
|
String mobile = user.getMobile();
|
|
String mobile = user.getMobile();
|
|
CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat();
|
|
CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat();
|
|
|
|
+
|
|
|
|
+ List<WebsitUser> websitUsers = websitUserService.lambdaQuery().eq(WebsitUser::getUserId, user.getUserId()).select(WebsitUser::getWebsitId).list();
|
|
|
|
+
|
|
List<UserWait> list = userWaitService.lambdaQuery()
|
|
List<UserWait> list = userWaitService.lambdaQuery()
|
|
.eq(UserWait::getMobile, mobile)
|
|
.eq(UserWait::getMobile, mobile)
|
|
|
|
+ .notIn(!CollectionUtils.isEmpty(websitUsers),UserWait::getWebsitId, websitUsers.stream().map(WebsitUser::getWebsitId).collect(Collectors.toList()))
|
|
.eq(UserWait::getCompanyWechatId, currentCompanyWechat.getCurrentCompanyWechatId())
|
|
.eq(UserWait::getCompanyWechatId, currentCompanyWechat.getCurrentCompanyWechatId())
|
|
.list();
|
|
.list();
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
if (CollectionUtils.isEmpty(list)) {
|
|
@@ -953,10 +957,7 @@ public class UserLogic {
|
|
if (user == null) {
|
|
if (user == null) {
|
|
throw new RemoteServiceException(ResponseHelper.ResponseCode_AUTH_ERROR, "请求不合法");
|
|
throw new RemoteServiceException(ResponseHelper.ResponseCode_AUTH_ERROR, "请求不合法");
|
|
}
|
|
}
|
|
- //授权手机号后检查是否有预设置的师傅身份信息
|
|
|
|
- if (StringUtils.isNotBlank(user.getMobile())) {
|
|
|
|
- userTypeInit(user);
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
UserWxBean userWxBean = new UserWxBean();
|
|
UserWxBean userWxBean = new UserWxBean();
|
|
BeanUtils.copyProperties(user, userWxBean);
|
|
BeanUtils.copyProperties(user, userWxBean);
|
|
userWxBean.setShoppingCartNums(shoppingCartLogic.total(userWxBean.getUserId()));
|
|
userWxBean.setShoppingCartNums(shoppingCartLogic.total(userWxBean.getUserId()));
|
|
@@ -977,7 +978,10 @@ public class UserLogic {
|
|
List<WorkerImg> workerImgs = workerImgService.lambdaQuery().eq(WorkerImg::getUserId, userId).list();
|
|
List<WorkerImg> workerImgs = workerImgService.lambdaQuery().eq(WorkerImg::getUserId, userId).list();
|
|
userWxBean.setWorkerImgs(workerImgs);
|
|
userWxBean.setWorkerImgs(workerImgs);
|
|
|
|
|
|
-
|
|
|
|
|
|
+ //授权手机号后检查是否有预设置的师傅身份信息
|
|
|
|
+ if (StringUtils.isNotBlank(user.getMobile())) {
|
|
|
|
+ userTypeInit(user);
|
|
|
|
+ }
|
|
return userWxBean;
|
|
return userWxBean;
|
|
}
|
|
}
|
|
|
|
|