|
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
|
|
import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
import lombok.*;
|
|
|
+import org.apache.logging.log4j.util.Strings;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
|
|
@@ -50,4 +51,28 @@ public class UserCard {
|
|
|
* 更新时间
|
|
|
*/
|
|
|
private LocalDateTime updateTime;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取展示身份证号
|
|
|
+ *
|
|
|
+ * @return : 返回显示身份证号
|
|
|
+ */
|
|
|
+ public String getShowCardId() {
|
|
|
+ if (Strings.isBlank(this.cardId)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return this.cardId.substring(0, 6) + "********" + this.cardId.substring(this.cardId.length() - 4);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取展示身份证号
|
|
|
+ *
|
|
|
+ * @return : 返回显示身份证号
|
|
|
+ */
|
|
|
+ public String getShowCardName() {
|
|
|
+ if (Strings.isBlank(this.cardName)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ return "**" + this.cardName.substring(this.cardName.length() - 1);
|
|
|
+ }
|
|
|
}
|