Commit a6fd3255 authored by zhouqian's avatar zhouqian

wechat-pay

parent ac92cb80
......@@ -31,13 +31,13 @@ public class UserExtInfo implements Serializable {
@Column(name = "education")
private EducationEnum educationEnum = EducationEnum.UNKNOWN;
@Column(name = "has_car")
private boolean hasCar = false;
private Boolean hasCar = false;
@Column(name = "has_social_security")
private boolean hasSocialSecurity = false;
private Boolean hasSocialSecurity = false;
@Column(name = "has_house")
private boolean hasHouse = false;
private Boolean hasHouse = false;
@Column(name = "has_credit_card")
private boolean hasCreditCard = false;
private Boolean hasCreditCard = false;
@Column(name = "marry_status")
private MaritalStatus marryStatus = MaritalStatus.UNKNOWN;
@Column(name = "created_at")
......
......@@ -27,6 +27,10 @@ public class UserExtInfoRet {
private Long createdAt;
private Long updateAt;
private static boolean defaultBoolean(Boolean k) {
return k == null ? false : k;
}
public static UserExtInfoRet getUserExtInfoRet(UserExtInfo extInfo) {
if (extInfo == null) {
return null;
......@@ -38,10 +42,10 @@ public class UserExtInfoRet {
ret.setIncomeRangeEnum(extInfo.getIncomeRangeEnum());
ret.setOccupationEnum(extInfo.getOccupationEnum());
ret.setEducationEnum(extInfo.getEducationEnum());
ret.setHasCar(extInfo.isHasCar());
ret.setHasSocialSecurity(extInfo.isHasSocialSecurity());
ret.setHasHouse(extInfo.isHasHouse());
ret.setHasCreditCard(extInfo.isHasCreditCard());
ret.setHasCar(defaultBoolean(extInfo.getHasCar()));
ret.setHasSocialSecurity(defaultBoolean(extInfo.getHasSocialSecurity()));
ret.setHasHouse(defaultBoolean(extInfo.getHasHouse()));
ret.setHasCreditCard(defaultBoolean(extInfo.getHasCreditCard()));
ret.setMarryStatus(extInfo.getMarryStatus());
ret.setCreatedAt(extInfo.getCreatedAt().getTime());
ret.setUpdateAt(extInfo.getUpdateAt().getTime());
......
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