Commit 1ac03b4d authored by zhengyi's avatar zhengyi

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

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