Commit f8f5e525be05a2476ab3e59084541a4cefd6bcfa

Authored by YunaiV
1 parent 2e7c3e09

✨ CRM:新增跟进记录表

yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerLimitConfigController.java
@@ -43,6 +43,7 @@ public class CrmCustomerLimitConfigController { @@ -43,6 +43,7 @@ public class CrmCustomerLimitConfigController {
43 @Resource 43 @Resource
44 private AdminUserApi adminUserApi; 44 private AdminUserApi adminUserApi;
45 45
  46 + // TODO @puhui999:可以把 vo 改下哈
46 @PostMapping("/create") 47 @PostMapping("/create")
47 @Operation(summary = "创建客户限制配置") 48 @Operation(summary = "创建客户限制配置")
48 @PreAuthorize("@ss.hasPermission('crm:customer-limit-config:create')") 49 @PreAuthorize("@ss.hasPermission('crm:customer-limit-config:create')")
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerPoolConfigController.java
@@ -26,6 +26,7 @@ public class CrmCustomerPoolConfigController { @@ -26,6 +26,7 @@ public class CrmCustomerPoolConfigController {
26 @Resource 26 @Resource
27 private CrmCustomerPoolConfigService customerPoolConfigService; 27 private CrmCustomerPoolConfigService customerPoolConfigService;
28 28
  29 + // TODO @puhui999:可以把 vo 改下哈
29 @GetMapping("/get") 30 @GetMapping("/get")
30 @Operation(summary = "获取客户公海规则设置") 31 @Operation(summary = "获取客户公海规则设置")
31 @PreAuthorize("@ss.hasPermission('crm:customer-pool-config:query')") 32 @PreAuthorize("@ss.hasPermission('crm:customer-pool-config:query')")
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/poolconfig/CrmCustomerPoolConfigSaveReqVO.java
@@ -16,9 +16,9 @@ import java.util.Objects; @@ -16,9 +16,9 @@ import java.util.Objects;
16 @ToString(callSuper = true) 16 @ToString(callSuper = true)
17 public class CrmCustomerPoolConfigSaveReqVO extends CrmCustomerPoolConfigBaseVO { 17 public class CrmCustomerPoolConfigSaveReqVO extends CrmCustomerPoolConfigBaseVO {
18 18
19 - // TODO @wanwan:AssertTrue 必须 is 开头哈;注意需要 json 忽略下,避免被序列化; 19 + // TODO @puhui999:AssertTrue 必须 is 开头哈;注意需要 json 忽略下,避免被序列化;
20 @AssertTrue(message = "客户公海规则设置不正确") 20 @AssertTrue(message = "客户公海规则设置不正确")
21 - // TODO @wanwan:这个方法,是不是拆成 2 个,一个校验 contactExpireDays、一个校验 dealExpireDays; 21 + // TODO @puhui999:这个方法,是不是拆成 2 个,一个校验 contactExpireDays、一个校验 dealExpireDays;
22 public boolean poolEnableValid() { 22 public boolean poolEnableValid() {
23 if (!BooleanUtil.isTrue(getEnabled())) { 23 if (!BooleanUtil.isTrue(getEnabled())) {
24 return true; 24 return true;
@@ -27,7 +27,7 @@ public class CrmCustomerPoolConfigSaveReqVO extends CrmCustomerPoolConfigBaseVO @@ -27,7 +27,7 @@ public class CrmCustomerPoolConfigSaveReqVO extends CrmCustomerPoolConfigBaseVO
27 } 27 }
28 28
29 @AssertTrue(message = "客户公海规则设置不正确") 29 @AssertTrue(message = "客户公海规则设置不正确")
30 - // TODO @wanwan:这个方法,是不是改成 isNotifyDaysValid() 更好点?本质校验的是 notifyDays 是否为空 30 + // TODO @puhui999:这个方法,是不是改成 isNotifyDaysValid() 更好点?本质校验的是 notifyDays 是否为空
31 public boolean notifyEnableValid() { 31 public boolean notifyEnableValid() {
32 if (!BooleanUtil.isTrue(getNotifyEnabled())) { 32 if (!BooleanUtil.isTrue(getNotifyEnabled())) {
33 return true; 33 return true;
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/customer/CrmCustomerDO.java
@@ -115,6 +115,7 @@ public class CrmCustomerDO extends BaseDO { @@ -115,6 +115,7 @@ public class CrmCustomerDO extends BaseDO {
115 * 最后跟进时间 115 * 最后跟进时间
116 */ 116 */
117 private LocalDateTime contactLastTime; 117 private LocalDateTime contactLastTime;
  118 + // TODO @puhui999:增加一个字段 contactLastContent;最后跟进内容
118 /** 119 /**
119 * 下次联系时间 120 * 下次联系时间
120 */ 121 */
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/followup/CrmFollowUpRecordDO.java 0 → 100644
  1 +package cn.iocoder.yudao.module.crm.dal.dataobject.followup;
  2 +
  3 +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
  4 +import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO;
  5 +import cn.iocoder.yudao.module.crm.dal.dataobject.contact.CrmContactDO;
  6 +import cn.iocoder.yudao.module.crm.enums.common.CrmBizTypeEnum;
  7 +import com.baomidou.mybatisplus.annotation.KeySequence;
  8 +import com.baomidou.mybatisplus.annotation.TableId;
  9 +import com.baomidou.mybatisplus.annotation.TableName;
  10 +import lombok.*;
  11 +
  12 +import java.time.LocalDateTime;
  13 +import java.util.List;
  14 +
  15 +// TODO @puhui999:界面:做成一个 list 列表,字段是 id、跟进人、跟进方式、跟进时间、跟进内容、下次联系时间、关联联系人、关联商机
  16 +// TODO @puhui999:界面:记录时,弹窗,表单字段是跟进方式、跟进内容、下次联系时间、关联联系人、关联商机;其中关联联系人、关联商机,要做成对应的组件列。
  17 +/**
  18 + * 跟进记录 DO
  19 + *
  20 + * 用于记录客户、联系人的每一次跟进
  21 + *
  22 + * @author 芋道源码
  23 + */
  24 +@TableName(value = "crm_follow_up_record")
  25 +@KeySequence("crm_follow_up_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
  26 +@Data
  27 +@EqualsAndHashCode(callSuper = true)
  28 +@ToString(callSuper = true)
  29 +@Builder
  30 +@NoArgsConstructor
  31 +@AllArgsConstructor
  32 +public class CrmFollowUpRecordDO extends BaseDO {
  33 +
  34 + /**
  35 + * 编号
  36 + */
  37 + @TableId
  38 + private Long id;
  39 +
  40 + /**
  41 + * 数据类型
  42 + *
  43 + * 枚举 {@link CrmBizTypeEnum}
  44 + */
  45 + private Integer bizType;
  46 + /**
  47 + * 数据编号
  48 + *
  49 + * 关联 {@link CrmBizTypeEnum} 对应模块 DO 的 id 字段
  50 + */
  51 + private Long bizId;
  52 +
  53 + /**
  54 + * 跟进类型
  55 + *
  56 + * TODO @puhui999:可以搞个数据字典,打电话、发短信、上门拜访、微信、邮箱、QQ
  57 + */
  58 + private Integer type;
  59 + /**
  60 + * 跟进内容
  61 + */
  62 + private String content;
  63 + /**
  64 + * 下次联系时间
  65 + */
  66 + private LocalDateTime nextTime;
  67 +
  68 + /**
  69 + * 关联的商机编号数组
  70 + *
  71 + * 关联 {@link CrmBusinessDO#getId()}
  72 + */
  73 + private List<Long> businessIds;
  74 + /**
  75 + * 关联的联系人编号数组
  76 + *
  77 + * 关联 {@link CrmContactDO#getId()}
  78 + */
  79 + private List<Long> contactIds;
  80 +
  81 +}