package cn.fw.valhalla.domain.dto; import cn.fw.valhalla.common.utils.BeanUtils; import cn.fw.valhalla.domain.db.MemberVehicle; import lombok.Data; import java.math.BigDecimal; import java.util.Date; import java.util.Objects; /** * @author kurisu */ @Data public class CustomerDetailDto { private Long id; private Long memberId; /** * 车牌号 */ private String plateNo; /** * 车架号 */ private String frameNo; /** * 发动机编号 */ private String engineNo; /** * 行驶证注册日期 */ private Date regDate; /** * 车型代码 */ private String specCode; /** * 品牌id */ private Long brandId; /** * 品牌名称 */ private String brandName; /** * 车系id */ private Long seriesId; /** * 车系名称 */ private String seriesName; /** * 车系id */ private Long specId; /** * 车系名称 */ private String specName; /** * 车辆图片 */ private String carImage; /** * 标签 */ private String tags; /** * 客户星级 */ private Integer cusLevel; /** * 购车日期 */ private Date buyDate; /** * 使用性质 1:非运营 2:运营 */ private Integer useType; /** * 使用地城市代码 */ private String cityCode; /** * 使用地城市名称 */ private String cityName; /** * 车主姓名 */ private String name; /** * 联系人姓名 */ private String contact; /** * 客户性别 */ private Integer gender; /** * 客户出生日期 */ private Date birthday; /** * 联系地址 */ private String address; /** * 纬度 */ private BigDecimal lat; /** * 经度 */ private BigDecimal lng; /** * 工作单位;个人 */ private String companyName; /** * 联系电话 */ private String mobile; /** * 爱好 */ private String hobby; /** * 职业 */ private String job; /** * 号码归属地 */ private String region; /** * 客户类型;1:个人;2:单位 */ private Integer cusType; /** * 组织机构代码 */ private String idCode; /** * 进站次数 */ private Integer arrivalCount; /** * 上次进站时间 */ private Date arrivalTime; /** * 最后一次进站行驶里程 */ private Integer currentMileage; /** * 保险到期时间 */ private Date insuranceExpires; /** * 专属服务顾问id */ private Long adviserId; /** * 专属服务顾问名称 */ private String adviserName; /** * 档案创建时间 */ private Date createTime; /** * 集团id */ private Long groupId; /** * 行驶证附件 */ private String vehicleLicense; /** * 所属服务站 */ private Long shopId; /** * 上次进站门店 */ private Long lastArrivalShop; /** * 车价 (分) */ private Long buyPrice; /** * 档案来源 */ private Integer source; /** * 使用有效 */ private Boolean yn; /** * 是否是贷款客户 */ private boolean loanCustomer; /** * 分期期数 */ private Integer periods; /** * 贷款到期时间 */ private Date expires; /** * 临时的专属顾问关系 */ private Boolean temporary; public Long getBuyPrice() { if (Objects.isNull(buyPrice)) { return 0L; } return buyPrice; } public static CustomerDetailDto with(MemberVehicle memberVehicle) { CustomerDetailDto dto = BeanUtils.copy(memberVehicle, CustomerDetailDto.class); dto.setUseType(memberVehicle.getUseType().getValue()); dto.setCusType(memberVehicle.getCusType().getValue()); return dto; } }