提交 0ed3092d 编写于 作者: H Hongwei Peng

fix spelling

上级 8d1f700e
...@@ -10,7 +10,7 @@ import java.util.Arrays; ...@@ -10,7 +10,7 @@ import java.util.Arrays;
* @since 1.8 * @since 1.8
*/ */
public enum AuthUserGender { public enum AuthUserGender {
MALE(1, "男"), FEMALE(0, "女"), UNKNOW(-1, "未知"); MALE(1, "男"), FEMALE(0, "女"), UNKNOWN(-1, "未知");
private int code; private int code;
private String desc; private String desc;
...@@ -21,7 +21,7 @@ public enum AuthUserGender { ...@@ -21,7 +21,7 @@ public enum AuthUserGender {
public static AuthUserGender getRealGender(String code) { public static AuthUserGender getRealGender(String code) {
if (code == null) { if (code == null) {
return UNKNOW; return UNKNOWN;
} }
String[] males = {"m", "男", "1", "male"}; String[] males = {"m", "男", "1", "male"};
if (Arrays.asList(males).contains(code.toLowerCase())) { if (Arrays.asList(males).contains(code.toLowerCase())) {
...@@ -31,7 +31,7 @@ public enum AuthUserGender { ...@@ -31,7 +31,7 @@ public enum AuthUserGender {
if (Arrays.asList(females).contains(code.toLowerCase())) { if (Arrays.asList(females).contains(code.toLowerCase())) {
return FEMALE; return FEMALE;
} }
return UNKNOW; return UNKNOWN;
} }
public int getCode() { public int getCode() {
......
...@@ -53,7 +53,7 @@ public class AuthCsdnRequest extends AuthDefaultRequest { ...@@ -53,7 +53,7 @@ public class AuthCsdnRequest extends AuthDefaultRequest {
.username(object.getString("username")) .username(object.getString("username"))
.remark(object.getString("description")) .remark(object.getString("description"))
.blog(object.getString("website")) .blog(object.getString("website"))
.gender(AuthUserGender.UNKNOW) .gender(AuthUserGender.UNKNOWN)
.token(authToken) .token(authToken)
.source(AuthSource.CSDN) .source(AuthSource.CSDN)
.build(); .build();
......
...@@ -63,7 +63,7 @@ public class AuthDingTalkRequest extends AuthDefaultRequest { ...@@ -63,7 +63,7 @@ public class AuthDingTalkRequest extends AuthDefaultRequest {
.uuid(object.getString("unionid")) .uuid(object.getString("unionid"))
.nickname(object.getString("nick")) .nickname(object.getString("nick"))
.username(object.getString("nick")) .username(object.getString("nick"))
.gender(AuthUserGender.UNKNOW) .gender(AuthUserGender.UNKNOWN)
.source(AuthSource.DINGTALK) .source(AuthSource.DINGTALK)
.token(token) .token(token)
.build(); .build();
......
...@@ -49,7 +49,7 @@ public class AuthDouyinRequest extends AuthDefaultRequest { ...@@ -49,7 +49,7 @@ public class AuthDouyinRequest extends AuthDefaultRequest {
.nickname(userInfoObject.getString("nickname")) .nickname(userInfoObject.getString("nickname"))
.avatar(userInfoObject.getString("avatar")) .avatar(userInfoObject.getString("avatar"))
.remark(userInfoObject.getString("description")) .remark(userInfoObject.getString("description"))
.gender(AuthUserGender.UNKNOW) .gender(AuthUserGender.UNKNOWN)
.token(authToken) .token(authToken)
.source(AuthSource.DOUYIN) .source(AuthSource.DOUYIN)
.build(); .build();
......
...@@ -55,7 +55,7 @@ public class AuthGiteeRequest extends AuthDefaultRequest { ...@@ -55,7 +55,7 @@ public class AuthGiteeRequest extends AuthDefaultRequest {
.location(object.getString("address")) .location(object.getString("address"))
.email(object.getString("email")) .email(object.getString("email"))
.remark(object.getString("bio")) .remark(object.getString("bio"))
.gender(AuthUserGender.UNKNOW) .gender(AuthUserGender.UNKNOWN)
.token(authToken) .token(authToken)
.source(AuthSource.GITEE) .source(AuthSource.GITEE)
.build(); .build();
......
...@@ -58,7 +58,7 @@ public class AuthGithubRequest extends AuthDefaultRequest { ...@@ -58,7 +58,7 @@ public class AuthGithubRequest extends AuthDefaultRequest {
.location(object.getString("location")) .location(object.getString("location"))
.email(object.getString("email")) .email(object.getString("email"))
.remark(object.getString("bio")) .remark(object.getString("bio"))
.gender(AuthUserGender.UNKNOW) .gender(AuthUserGender.UNKNOWN)
.token(authToken) .token(authToken)
.source(AuthSource.GITHUB) .source(AuthSource.GITHUB)
.build(); .build();
......
...@@ -61,7 +61,7 @@ public class AuthGoogleRequest extends AuthDefaultRequest { ...@@ -61,7 +61,7 @@ public class AuthGoogleRequest extends AuthDefaultRequest {
.nickname(object.getString("name")) .nickname(object.getString("name"))
.location(object.getString("locale")) .location(object.getString("locale"))
.email(object.getString("email")) .email(object.getString("email"))
.gender(AuthUserGender.UNKNOW) .gender(AuthUserGender.UNKNOWN)
.token(authToken) .token(authToken)
.source(AuthSource.GOOGLE) .source(AuthSource.GOOGLE)
.build(); .build();
......
...@@ -81,7 +81,7 @@ public class AuthLinkedinRequest extends AuthDefaultRequest { ...@@ -81,7 +81,7 @@ public class AuthLinkedinRequest extends AuthDefaultRequest {
.avatar(avatar) .avatar(avatar)
.email(email) .email(email)
.token(authToken) .token(authToken)
.gender(AuthUserGender.UNKNOW) .gender(AuthUserGender.UNKNOWN)
.source(AuthSource.LINKEDIN) .source(AuthSource.LINKEDIN)
.build(); .build();
} }
......
...@@ -78,7 +78,7 @@ public class AuthMiRequest extends AuthDefaultRequest { ...@@ -78,7 +78,7 @@ public class AuthMiRequest extends AuthDefaultRequest {
.nickname(user.getString("miliaoNick")) .nickname(user.getString("miliaoNick"))
.avatar(user.getString("miliaoIcon")) .avatar(user.getString("miliaoIcon"))
.email(user.getString("mail")) .email(user.getString("mail"))
.gender(AuthUserGender.UNKNOW) .gender(AuthUserGender.UNKNOWN)
.token(authToken) .token(authToken)
.source(AuthSource.MI) .source(AuthSource.MI)
.build(); .build();
......
...@@ -83,7 +83,7 @@ public class AuthMicrosoftRequest extends AuthDefaultRequest { ...@@ -83,7 +83,7 @@ public class AuthMicrosoftRequest extends AuthDefaultRequest {
.nickname(object.getString("displayName")) .nickname(object.getString("displayName"))
.location(object.getString("officeLocation")) .location(object.getString("officeLocation"))
.email(object.getString("mail")) .email(object.getString("mail"))
.gender(AuthUserGender.UNKNOW) .gender(AuthUserGender.UNKNOWN)
.token(authToken) .token(authToken)
.source(AuthSource.MICROSOFT) .source(AuthSource.MICROSOFT)
.build(); .build();
......
...@@ -77,7 +77,7 @@ public class AuthRenrenRequest extends AuthDefaultRequest { ...@@ -77,7 +77,7 @@ public class AuthRenrenRequest extends AuthDefaultRequest {
private AuthUserGender getGender(JSONObject userObj) { private AuthUserGender getGender(JSONObject userObj) {
JSONObject basicInformation = userObj.getJSONObject("basicInformation"); JSONObject basicInformation = userObj.getJSONObject("basicInformation");
if (Objects.isNull(basicInformation)) { if (Objects.isNull(basicInformation)) {
return AuthUserGender.UNKNOW; return AuthUserGender.UNKNOWN;
} }
return AuthUserGender.getRealGender(basicInformation.getString("sex")); return AuthUserGender.getRealGender(basicInformation.getString("sex"));
} }
......
...@@ -47,7 +47,7 @@ public class AuthTaobaoRequest extends AuthDefaultRequest { ...@@ -47,7 +47,7 @@ public class AuthTaobaoRequest extends AuthDefaultRequest {
.uuid(accessTokenObject.getString("taobao_user_id")) .uuid(accessTokenObject.getString("taobao_user_id"))
.username(nick) .username(nick)
.nickname(nick) .nickname(nick)
.gender(AuthUserGender.UNKNOW) .gender(AuthUserGender.UNKNOWN)
.token(authToken) .token(authToken)
.source(AuthSource.TAOBAO) .source(AuthSource.TAOBAO)
.build(); .build();
......
...@@ -66,7 +66,7 @@ public class AuthTeambitionRequest extends AuthDefaultRequest { ...@@ -66,7 +66,7 @@ public class AuthTeambitionRequest extends AuthDefaultRequest {
.blog(object.getString("website")) .blog(object.getString("website"))
.location(object.getString("location")) .location(object.getString("location"))
.email(object.getString("email")) .email(object.getString("email"))
.gender(AuthUserGender.UNKNOW) .gender(AuthUserGender.UNKNOWN)
.token(authToken) .token(authToken)
.source(AuthSource.TEAMBITION) .source(AuthSource.TEAMBITION)
.build(); .build();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册