浏览代码

no message

FengChaoYu 6 月之前
父节点
当前提交
436cc32f19
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/user/UserLogic.java

+ 8 - 1
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/user/UserLogic.java

@@ -1219,7 +1219,14 @@ public class UserLogic {
                 .last("limit 1")
                 .one();
         if (Objects.isNull(userWait)) {
-            throw new RemoteServiceException("请输入正确师傅手机号");
+            final User user = userService.lambdaQuery().eq(User::getMobile, mobile)
+                    .eq(User::getType, UserTypeEnum.WORKER.getKey())
+                    .last("limit 1")
+                    .one();
+
+            if (Objects.isNull(user)) {
+                throw new RemoteServiceException("请输入正确师傅手机号");
+            }
         }
 
         // 向手机号发送验证码