Commit a6fd3255 authored by zhouqian's avatar zhouqian

wechat-pay

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