CRM:【联系人】统一字段

This commit is contained in:
YunaiV 2024-01-03 23:30:25 +08:00
parent cff6e520ee
commit 02324f9e60
3 changed files with 39 additions and 31 deletions

View File

@ -8,11 +8,11 @@ import cn.iocoder.yudao.module.infra.enums.DictTypeConstants;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;
@ -75,29 +75,29 @@ public class CrmContactBaseVO {
@ExcelProperty(value = "邮箱",order = 4) @ExcelProperty(value = "邮箱",order = 4)
private String email; private String email;
@Schema(description = "地区编号", example = "20158")
private Integer areaId;
@ExcelProperty(value = "地址",order = 5) @ExcelProperty(value = "地址",order = 5)
@Schema(description = "地址") @Schema(description = "地址")
private String address; private String detailAddress;
@Schema(description = "下次联系时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
@ExcelProperty(value = "下次联系时间",order = 6)
private LocalDateTime nextTime;
@Schema(description = "备注", example = "你说的对") @Schema(description = "备注", example = "你说的对")
@ExcelProperty(value = "备注",order = 6) @ExcelProperty(value = "备注",order = 6)
private String remark; private String remark;
@Schema(description = "最后跟进时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ExcelProperty(value = "最后跟进时间",order = 6)
private LocalDateTime lastTime;
@Schema(description = "负责人用户编号", example = "14334") @Schema(description = "负责人用户编号", example = "14334")
@NotNull(message = "负责人不能为空") @NotNull(message = "负责人不能为空")
private Long ownerUserId; private Long ownerUserId;
@Schema(description = "地区编号", example = "20158") @Schema(description = "最后跟进时间")
private Integer areaId; @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@ExcelProperty(value = "最后跟进时间",order = 6)
private LocalDateTime contactLastTime;
@Schema(description = "下次联系时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
@ExcelProperty(value = "下次联系时间",order = 6)
private LocalDateTime contactNextTime;
} }

View File

@ -1,6 +1,7 @@
package cn.iocoder.yudao.module.crm.dal.dataobject.contact; package cn.iocoder.yudao.module.crm.dal.dataobject.contact;
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO;
import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@ -29,9 +30,11 @@ public class CrmContactDO extends BaseDO {
@TableId @TableId
private Long id; private Long id;
/** /**
* 下次联系时间 * 客户编号
*
* 关联 {@link CrmCustomerDO#getId()}
*/ */
private LocalDateTime nextTime; private Long customerId;
/** /**
* 手机号 * 手机号
*/ */
@ -45,21 +48,20 @@ public class CrmContactDO extends BaseDO {
*/ */
private String email; private String email;
/** /**
* 客户编号 * 所在地
*
* 关联 {@link cn.iocoder.yudao.framework.ip.core.Area#getId()} 字段
*/ */
private Long customerId; private Integer areaId;
/** /**
* 地址 * 详细地址
*/ */
private String address; private String detailAddress;
/** /**
* 备注 * 备注
*/ */
private String remark; private String remark;
/**
* 最后跟进时间
*/
private LocalDateTime lastTime;
/** /**
* 直属上级 * 直属上级
* *
@ -100,10 +102,13 @@ public class CrmContactDO extends BaseDO {
private Long ownerUserId; private Long ownerUserId;
/** /**
* 所在地 * 最后跟进时间
*
* 关联 {@link cn.iocoder.yudao.framework.ip.core.Area#getId()} 字段
*/ */
private Integer areaId; private LocalDateTime contactLastTime;
// TODO @puhui999增加一个字段 contactLastContent最后跟进内容
/**
* 下次联系时间
*/
private LocalDateTime contactNextTime;
} }

View File

@ -12,7 +12,7 @@ import java.time.LocalDateTime;
// TODO 芋艿调整下字段 // TODO 芋艿调整下字段
/** /**
* 客户 DO * CRM 客户 DO
* *
* @author Wanwan * @author Wanwan
*/ */
@ -104,13 +104,16 @@ public class CrmCustomerDO extends BaseDO {
*/ */
private Long ownerUserId; private Long ownerUserId;
/** /**
* 地区编号 * 所在地
*
* 关联 {@link cn.iocoder.yudao.framework.ip.core.Area#getId()} 字段
*/ */
private Integer areaId; private Integer areaId;
/** /**
* 详细地址 * 详细地址
*/ */
private String detailAddress; private String detailAddress;
/** /**
* 最后跟进时间 * 最后跟进时间
*/ */