Commit 677cfef7 authored by Quxl's avatar Quxl

修改消息提示

parent a8b5fe46
......@@ -31,7 +31,7 @@ public class AdminLoginController {
@PostMapping("login")
@ApiOperation("登陆")
public Object login(String username, String password) {
XException.assertNotBlank(messages.get("sys.err.user_pwd_null"), username, password);
XException.assertNotBlank(messages.get("err.user_pwd_null"), username, password);
if(tokenService.isLogin()) {
throw new XException("用户已登录", 200);
} else {
......@@ -39,7 +39,7 @@ public class AdminLoginController {
if(token != null) {
return Rjx.jsonOk().setData(token);
} else {
throw new XException(messages.get("sys.err.user_or_pwd"));
throw new XException(messages.get("err.user_or_pwd"));
}
}
}
......
......@@ -30,7 +30,7 @@ public class MemberLoginController {
@PostMapping("login")
@ApiOperation("登陆")
public Object login(String username, String password) {
XException.assertNotBlank(messages.get("sys.err.user_pwd_null"), username, password);
XException.assertNotBlank(messages.get("err.user_pwd_null"), username, password);
if(tokenService.isLogin()) {
throw new XException("", 200);
} else {
......@@ -38,7 +38,7 @@ public class MemberLoginController {
if(token != null) {
return Rjx.jsonOk();
} else {
throw new XException(messages.get("sys.err.user_or_pwd"));
throw new XException(messages.get("err.user_or_pwd"));
}
}
}
......
......@@ -30,7 +30,7 @@ public class UserLoginController {
@PostMapping("login")
@ApiOperation("登陆")
public Object login(String username, String password) {
XException.assertNotBlank(messages.get("sys.err.user_pwd_null"), username, password);
XException.assertNotBlank(messages.get("err.user_pwd_null"), username, password);
if(tokenService.isLogin()) {
throw new XException("", 200);
} else {
......@@ -38,7 +38,7 @@ public class UserLoginController {
if(token != null) {
return Rjx.jsonOk().setData(token);
} else {
throw new XException(messages.get("sys.err.user_or_pwd"));
throw new XException(messages.get("err.user_or_pwd"));
}
}
}
......
......@@ -30,7 +30,7 @@ public class MemberTokenServiceImpl implements MemberTokenService {
try {
member = memberService.getMemberByEmail(email);
} catch (Exception e) {
throw new XException(messages.get("sys.err.user_pwd_err"));
throw new XException(messages.get("err.user_pwd_err"));
}
Integer state = member.getState();
if(state == 1) {
......@@ -43,12 +43,12 @@ public class MemberTokenServiceImpl implements MemberTokenService {
session.setAttribute(TOKEN_NAME, token);
return token;
} else {
throw new XException(messages.get("sys.err.user_pwd_err"));
throw new XException(messages.get("err.user_pwd_err"));
}
} else if(state == 2) {
throw new XException(messages.get("sys.err.user_disabled"));
throw new XException(messages.get("err.user_disabled"));
} else {
throw new XException(messages.get("sys.err"));
throw new XException(messages.get("err"));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment