tianboguang hace 3 años
padre
commit
fd558a3f7b

+ 9 - 6
platform-common/src/main/java/com/platform/service/impl/SysUserServiceImpl.java

@@ -5,10 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.github.pagehelper.util.StringUtil;
 import com.platform.dao.SysUserDao;
-import com.platform.entity.SysDeptEntity;
-import com.platform.entity.SysRoleEntity;
-import com.platform.entity.SysUserEntity;
-import com.platform.entity.UserWindowDto;
+import com.platform.entity.*;
 import com.platform.enums.ResultCodeEnum;
 import com.platform.enums.SysRoleEnum;
 import com.platform.exception.CommonBaseException;
@@ -281,8 +278,14 @@ public class SysUserServiceImpl implements SysUserService {
                 throw new CommonBaseException(500,"请求失败");
             }
             JSONObject result = JSONObject.parseObject(loginResult.getBody());
-            if (result.getInteger("code") != 0) {
-                throw new CommonBaseException(500, "四维账号密码输入错误,请重试");
+            if (result.getInteger("code") == 3015) {
+                throw new CommonBaseException(500, "此账号未注册,请先注册后再绑定。");
+            }
+            if(result.getInteger("code") == 3014){
+                throw new CommonBaseException(500, "四维看看账号密码有误,请重新输入。");
+            }
+            if (result.getInteger("code") != Result.CODE_SUCCESS) {
+                throw new CommonBaseException(500, "请求失败,请重试");
             }
         }
         Map<String, Object> map = new HashMap<>();

+ 1 - 1
platform-shop/src/main/java/com/platform/controller/TokenController.java

@@ -62,7 +62,7 @@ public class TokenController extends AbstractController{
             }
             JSONObject result = JSONObject.parseObject(responseEntity.getBody());
             if (result.getInteger("code") != 0) {
-                throw new CommonBaseException(ResultCodeEnum.D101, "4d看看密码有误!");
+                throw new CommonBaseException(ResultCodeEnum.D101, "四维看看账号密码有误,请重新绑定");
             }
             return Result.success("操作成功",result.getJSONObject("data").getString("token"));
         }