| | |
| | | private final Integer gender; |
| | | private final LocalDate birthDate; |
| | | private final Integer age; |
| | | private final String ageRange; |
| | | private final Integer workYears; |
| | | private final String workYearRange; |
| | | private final String idCardNo; |
| | | private final String idCardFrontUrl; |
| | | private final String idCardBackUrl; |
| | |
| | | private final Long currentMonthOrderCount; |
| | | private final BigDecimal rating; |
| | | private final boolean autoDisableWhitelisted; |
| | | private final boolean premiumEnabled; |
| | | private final String wechatOpenId; |
| | | private final Integer status; |
| | | private final LocalDateTime createdAt; |
| | | private final List<GuideScenicConfigResponse> scenicConfigs; |
| | | |
| | | public GuideUserDetailResponse(GuideUser user, String teamName, List<GuideScenicConfig> scenicConfigs) { |
| | | this(user, teamName, scenicConfigs, user.getBirthDate(), user.getWorkYears()); |
| | | } |
| | | |
| | | public GuideUserDetailResponse(GuideUser user, String teamName, List<GuideScenicConfig> scenicConfigs, |
| | | LocalDate birthDate, Integer workYears) { |
| | | this(user, teamName, scenicConfigs, birthDate, workYears, null, null); |
| | | } |
| | | |
| | | public GuideUserDetailResponse(GuideUser user, String teamName, List<GuideScenicConfig> scenicConfigs, |
| | | LocalDate birthDate, Integer workYears, |
| | | String ageRange, String workYearRange) { |
| | | this.id = user.getId(); |
| | | this.username = user.getUsername(); |
| | | this.realName = user.getRealName(); |
| | |
| | | this.avatar = user.getAvatar(); |
| | | this.certificateNo = user.getCertificateNo(); |
| | | this.gender = user.getGender(); |
| | | this.birthDate = user.getBirthDate(); |
| | | this.age = user.getBirthDate() == null ? null : Period.between(user.getBirthDate(), LocalDate.now()).getYears(); |
| | | this.workYears = user.getWorkYears(); |
| | | this.birthDate = birthDate; |
| | | this.age = birthDate == null ? null : Period.between(birthDate, LocalDate.now()).getYears(); |
| | | this.ageRange = ageRange; |
| | | this.workYears = workYears; |
| | | this.workYearRange = workYearRange; |
| | | this.idCardNo = user.getIdCardNo(); |
| | | this.idCardFrontUrl = user.getIdCardFrontUrl(); |
| | | this.idCardBackUrl = user.getIdCardBackUrl(); |
| | |
| | | this.currentMonthOrderCount = user.getCurrentMonthOrderCount() == null ? 0L : user.getCurrentMonthOrderCount(); |
| | | this.rating = user.getRating() == null ? BigDecimal.ZERO : user.getRating(); |
| | | this.autoDisableWhitelisted = user.getAutoDisableWhitelisted() != null && user.getAutoDisableWhitelisted() == 1; |
| | | this.premiumEnabled = Integer.valueOf(1).equals(user.getPremiumEnabled()); |
| | | this.wechatOpenId = user.getWechatOpenId(); |
| | | this.status = user.getStatus(); |
| | | this.createdAt = user.getCreatedAt(); |
| | |
| | | public Integer getGender() { return gender; } |
| | | public LocalDate getBirthDate() { return birthDate; } |
| | | public Integer getAge() { return age; } |
| | | public String getAgeRange() { return ageRange; } |
| | | public Integer getWorkYears() { return workYears; } |
| | | public String getWorkYearRange() { return workYearRange; } |
| | | public String getIdCardNo() { return idCardNo; } |
| | | public String getIdCardFrontUrl() { return idCardFrontUrl; } |
| | | public String getIdCardBackUrl() { return idCardBackUrl; } |
| | |
| | | public Long getCurrentMonthOrderCount() { return currentMonthOrderCount; } |
| | | public BigDecimal getRating() { return rating; } |
| | | public boolean isAutoDisableWhitelisted() { return autoDisableWhitelisted; } |
| | | public boolean isPremiumEnabled() { return premiumEnabled; } |
| | | public String getWechatOpenId() { return wechatOpenId; } |
| | | public Integer getStatus() { return status; } |
| | | public LocalDateTime getCreatedAt() { return createdAt; } |