Commit 1ac03b4d authored by zhengyi's avatar zhengyi

客户列表返回最新的跟进记录完整信息

parent bbb3f840
package cn.iocoder.yudao.module.customer.dal.dataobject.customer; package cn.iocoder.yudao.module.customer.dal.dataobject.customer;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.customer.vo.customerFollowup.CustomerFollowupBackVO;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
...@@ -526,20 +527,11 @@ public class CustomerDO extends BaseDO { ...@@ -526,20 +527,11 @@ public class CustomerDO extends BaseDO {
@TableField(exist = false) @TableField(exist = false)
private String competitorNames; private String competitorNames;
// competitorNames
@ApiModelProperty("最新跟进记录id") @ApiModelProperty("最新跟进记录信息")
@TableField(exist = false) @TableField(exist = false)
private Long followupId; private CustomerFollowupBackVO followupBackVO;
@ApiModelProperty("最新跟进记录编号")
@TableField(exist = false)
private String followupNumber;
@ApiModelProperty("最新跟进记录时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@TableField(exist = false)
private Date followupDate;
} }
...@@ -34,6 +34,7 @@ import cn.iocoder.yudao.module.customer.convert.customer.CustomerConvert; ...@@ -34,6 +34,7 @@ import cn.iocoder.yudao.module.customer.convert.customer.CustomerConvert;
import cn.iocoder.yudao.module.customer.convert.customer.line.CustomerLineConvert; import cn.iocoder.yudao.module.customer.convert.customer.line.CustomerLineConvert;
import cn.iocoder.yudao.module.customer.convert.customerBank.CustomerBankConvert; import cn.iocoder.yudao.module.customer.convert.customerBank.CustomerBankConvert;
import cn.iocoder.yudao.module.customer.convert.customerContacts.CustomerContactsConvert; import cn.iocoder.yudao.module.customer.convert.customerContacts.CustomerContactsConvert;
import cn.iocoder.yudao.module.customer.convert.customerFollowup.CustomerFollowupConvert;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO; import cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO;
import cn.iocoder.yudao.module.customer.dal.dataobject.customer.line.CustomerLineDO; import cn.iocoder.yudao.module.customer.dal.dataobject.customer.line.CustomerLineDO;
import cn.iocoder.yudao.module.customer.dal.dataobject.customerAirLog.CustomerAirLogDO; import cn.iocoder.yudao.module.customer.dal.dataobject.customerAirLog.CustomerAirLogDO;
...@@ -1189,9 +1190,7 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper, ...@@ -1189,9 +1190,7 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
.orderByDesc(CustomerFollowupDO::getId) .orderByDesc(CustomerFollowupDO::getId)
.last("limit 1")); .last("limit 1"));
if (Objects.nonNull(customerFollowupDO)) { if (Objects.nonNull(customerFollowupDO)) {
customerDO.setFollowupId(customerFollowupDO.getId()); customerDO.setFollowupBackVO(CustomerFollowupConvert.INSTANCE.convert(customerFollowupDO));
customerDO.setFollowupNumber(customerFollowupDO.getNumber());
customerDO.setFollowupDate(customerFollowupDO.getCreateTime());
} }
} }
} }
......
package cn.iocoder.yudao.module.customer.vo.customer.vo; package cn.iocoder.yudao.module.customer.vo.customer.vo;
import cn.iocoder.yudao.module.customer.vo.customerFollowup.CustomerFollowupBackVO;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
...@@ -238,19 +239,7 @@ public class CustomerRespVO extends CustomerBaseVO { ...@@ -238,19 +239,7 @@ public class CustomerRespVO extends CustomerBaseVO {
@ApiModelProperty(value = "主营产品") @ApiModelProperty(value = "主营产品")
private String productIds; private String productIds;
@ApiModelProperty("最新跟进记录id") @ApiModelProperty("最新跟进记录信息")
@TableField(exist = false) @TableField(exist = false)
private Long followupId; private CustomerFollowupBackVO followupBackVO;
@ApiModelProperty("最新跟进记录编号")
@TableField(exist = false)
private String followupNumber;
@ApiModelProperty("最新跟进记录时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@TableField(exist = false)
private Date followupDate;
} }
...@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.customer.vo.customerFollowup; ...@@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.customer.vo.customerFollowup;
import cn.iocoder.yudao.framework.excel.annotations.DictFormat; import cn.iocoder.yudao.framework.excel.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.convert.DictConvert; import cn.iocoder.yudao.framework.excel.convert.DictConvert;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*; import lombok.*;
import java.util.*; import java.util.*;
import io.swagger.annotations.*; import io.swagger.annotations.*;
...@@ -114,6 +115,7 @@ public class CustomerFollowupBackVO { ...@@ -114,6 +115,7 @@ public class CustomerFollowupBackVO {
@ExcelProperty("创建时间") @ExcelProperty("创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ApiModelProperty(value = "创建时间", required = true) @ApiModelProperty(value = "创建时间", required = true)
private Date createTime; private Date createTime;
......
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