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

fix spelling

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