Showing
1 changed file
with
4 additions
and
4 deletions
@@ -39,11 +39,11 @@ public class LoginService { | @@ -39,11 +39,11 @@ public class LoginService { | ||
39 | public Response<UserInfoResponseBO> login(String loginName, String password) throws Exception { | 39 | public Response<UserInfoResponseBO> login(String loginName, String password) throws Exception { |
40 | if (StringUtils.isEmpty(loginName)) { | 40 | if (StringUtils.isEmpty(loginName)) { |
41 | logger.warn("login error. loginName is empty"); | 41 | logger.warn("login error. loginName is empty"); |
42 | - return new Response<UserInfoResponseBO>(201, "登录名为空"); | 42 | + return new Response<>(201, "登录名为空"); |
43 | } | 43 | } |
44 | if (StringUtils.isEmpty(password)) { | 44 | if (StringUtils.isEmpty(password)) { |
45 | logger.warn("login error. password is empty. with loginName={}", loginName); | 45 | logger.warn("login error. password is empty. with loginName={}", loginName); |
46 | - return new Response<UserInfoResponseBO>(202, "密码为空"); | 46 | + return new Response<>(202, "密码为空"); |
47 | } | 47 | } |
48 | 48 | ||
49 | String url = erpDomain + PlatformConstant.ERP_LOGIN_URL; | 49 | String url = erpDomain + PlatformConstant.ERP_LOGIN_URL; |
@@ -57,8 +57,8 @@ public class LoginService { | @@ -57,8 +57,8 @@ public class LoginService { | ||
57 | 57 | ||
58 | logger.info("enter login with code={}", body.get("code")); | 58 | logger.info("enter login with code={}", body.get("code")); |
59 | 59 | ||
60 | - if (!"200".equals(body.get("code"))) { | ||
61 | - // return new Response<UserInfoResponseBO>(202, "密码错误"); | 60 | + if (!"200".equals(String.valueOf(body.get("code")))) { |
61 | + return new Response<>(202, "密码错误"); | ||
62 | } | 62 | } |
63 | 63 | ||
64 | Map<String, Object> data = (Map<String, Object>) body.get("data"); | 64 | Map<String, Object> data = (Map<String, Object>) body.get("data"); |
-
Please register or login to post a comment