perf:调整授权登录
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
package com.tiesheng.login.pojos;
|
||||
|
||||
public class CodeExtraDTO {
|
||||
public class CodeExtraDTO extends LoginToInfo {
|
||||
|
||||
private String code;
|
||||
private String extra;
|
||||
private String to;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// setter\getter
|
||||
@@ -26,11 +25,4 @@ public class CodeExtraDTO {
|
||||
this.extra = extra;
|
||||
}
|
||||
|
||||
public String getTo() {
|
||||
return to;
|
||||
}
|
||||
|
||||
public void setTo(String to) {
|
||||
this.to = to;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.tiesheng.login.pojos;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
public class LoginToInfo {
|
||||
|
||||
private String to;
|
||||
|
||||
/**
|
||||
* 获取默认的去往目的地
|
||||
*
|
||||
* @param def
|
||||
* @return
|
||||
*/
|
||||
public String getDefaultTo(String def) {
|
||||
if (StrUtil.isEmpty(getTo())) {
|
||||
return def;
|
||||
}
|
||||
return getTo();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取默认的去往目的地
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getDefaultTo() {
|
||||
return getDefaultTo("mobile");
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// setter\getter
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public String getTo() {
|
||||
return to;
|
||||
}
|
||||
|
||||
public void setTo(String to) {
|
||||
this.to = to;
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,9 @@ package com.tiesheng.login.pojos;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
public class UniqueIndexDTO {
|
||||
public class UniqueIndexDTO extends LoginToInfo {
|
||||
|
||||
private String no;
|
||||
private String to;
|
||||
private String extra;
|
||||
private String info;
|
||||
|
||||
@@ -21,14 +20,6 @@ public class UniqueIndexDTO {
|
||||
this.no = no;
|
||||
}
|
||||
|
||||
public String getTo() {
|
||||
return to;
|
||||
}
|
||||
|
||||
public void setTo(String to) {
|
||||
this.to = to;
|
||||
}
|
||||
|
||||
public String getExtra() {
|
||||
if (StrUtil.isEmpty(extra)) {
|
||||
extra = "";
|
||||
|
||||
Reference in New Issue
Block a user