Commit 741e1f14 authored by 技术部-任文超's avatar 技术部-任文超

对UserRet模型中用户密码脱敏

parent 793ed374
...@@ -6,6 +6,7 @@ import java.util.Objects; ...@@ -6,6 +6,7 @@ import java.util.Objects;
import lombok.Data; import lombok.Data;
import cn.quantgroup.xyqb.entity.User; import cn.quantgroup.xyqb.entity.User;
import org.apache.commons.lang3.StringUtils;
/** /**
* Created by 11 on 2016/12/20. * Created by 11 on 2016/12/20.
...@@ -51,7 +52,7 @@ public class UserRet implements Serializable { ...@@ -51,7 +52,7 @@ public class UserRet implements Serializable {
this.setId(user.getId()); this.setId(user.getId());
this.setPhoneNo(user.getPhoneNo()); this.setPhoneNo(user.getPhoneNo());
this.setEnable(user.getEnable()); this.setEnable(user.getEnable());
this.setPassword(""); this.setPassword(StringUtils.isBlank(user.getPassword()) ? "" : "*");
this.hasPassword = Objects.nonNull(password) && !Objects.equals("", password); this.hasPassword = Objects.nonNull(password) && !Objects.equals("", password);
this.setRegisteredFrom(user.getRegisteredFrom()); this.setRegisteredFrom(user.getRegisteredFrom());
this.setUuid(user.getUuid()); this.setUuid(user.getUuid());
......
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