Commit 21eb10da authored by Quxl's avatar Quxl

优化国际化信息结构

parent 19d61645
......@@ -51,9 +51,9 @@ public class MemberOpenApiController {
@ApiImplicitParam(paramType = "query", dataType = "string", required = true, name = "email"),
})
public Object register(HttpServletRequest request, String username, String password, String email) {
XException.assertNotBlank(messages.get("sys.err.email_null"), email);
XException.assertNotBlank(messages.get("sys.err.name_null"), username);
XException.assertNotBlank(messages.get("sys.err.pwd_null"), password);
XException.assertNotBlank(messages.get("err.email_null"), email);
XException.assertNotBlank(messages.get("err.name_null"), username);
XException.assertNotBlank(messages.get("err.pwd_null"), password);
Locale locale = LocaleContextHolder.getLocale();
String salt = Common.getGenerateString(6);
String encodePwd = Common.encodePassword(password, salt);
......@@ -67,7 +67,7 @@ public class MemberOpenApiController {
member.setLang(locale == null ? "zh" : locale.getLanguage());
member.setState(1);
if(memberService.exists(email)) {
throw new XException(messages.get("sys.err.user_exists"));
throw new XException(messages.get("err.user_exists"));
}
memberService.saveMember(member);
return Rjx.jsonOk();
......@@ -78,7 +78,7 @@ public class MemberOpenApiController {
@ApiOperation("找回密码")
@ApiImplicitParams({@ApiImplicitParam(paramType = "query", dataType = "string", required = true, name = "email")})
public Object resetPassword(String email) {
XException.assertNotBlank(messages.get("sys.err.email_null"), email);
XException.assertNotBlank(messages.get("err.email_null"), email);
int code = (int) ((Math.random() * 9 + 1) * 10000000);
String password = String.valueOf(code);
Fc_member member = memberService.getMemberByEmail(email);
......
......@@ -2,12 +2,12 @@ msg.test=Test
email.getPassword.subject=China Film Festival [retrieve password] email
email.getPassword.content=Hello {0}, Your password is: [{1}]
sys.err=System error
sys.err.user_disabled=User disabled
sys.err.user_pwd_err=User or password error
sys.err.user_pwd_null=User and passowrd can not be null
sys.err.user_exists=User already exists
sys.err.email_null=The mailbox can not be empty
sys.err.name_null=The username can not be empty
sys.err.pwd_null=The password can not be empty
err=System error
err.user_disabled=User disabled
err.user_pwd_err=User or password error
err.user_pwd_null=User and passowrd can not be null
err.user_exists=User already exists
err.email_null=The mailbox can not be empty
err.name_null=The username can not be empty
err.pwd_null=The password can not be empty
......@@ -2,12 +2,12 @@ msg.test=\u6D4B\u8BD5
email.getPassword.subject=\u4E2D\u56FD\u7535\u5F71\u8282[\u627E\u56DE\u5BC6\u7801]\u90AE\u4EF6
email.getPassword.content={0} \u60A8\u597D, \u60A8\u7684\u65B0\u5BC6\u7801\u662F: [{1}]
sys.err=\u7CFB\u7EDF\u9519\u8BEF
sys.err.user_disabled=\u7528\u6237\u5DF2\u7ECF\u7981\u7528
sys.err.user_pwd_err=\u7528\u6237\u6216\u5BC6\u7801\u9519\u8BEF
sys.err.user_pwd_null=\u7528\u6237\u540D\u548C\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A
sys.err.user_exists=\u7528\u6237\u5DF2\u5B58\u5728
sys.err.email_null=\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A
sys.err.name_null=\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A
sys.err.pwd_null=\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A
err=\u7CFB\u7EDF\u9519\u8BEF
err.user_disabled=\u7528\u6237\u5DF2\u7ECF\u7981\u7528
err.user_pwd_err=\u7528\u6237\u6216\u5BC6\u7801\u9519\u8BEF
err.user_pwd_null=\u7528\u6237\u540D\u548C\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A
err.user_exists=\u7528\u6237\u5DF2\u5B58\u5728
err.email_null=\u90AE\u7BB1\u4E0D\u80FD\u4E3A\u7A7A
err.name_null=\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A
err.pwd_null=\u5BC6\u7801\u4E0D\u80FD\u4E3A\u7A7A
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