Commit fe330482b35ada5c948b9bec3f3feea55243a169
1 parent
49bc70ed
📖 CRM:线索 clue 新增/修改的完善
Showing
11 changed files
with
27 additions
and
230 deletions
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/vo/CrmClueRespVO.java
| @@ -70,10 +70,6 @@ public class CrmClueRespVO { | @@ -70,10 +70,6 @@ public class CrmClueRespVO { | ||
| 70 | @ExcelProperty("电话") | 70 | @ExcelProperty("电话") |
| 71 | private String telephone; | 71 | private String telephone; |
| 72 | 72 | ||
| 73 | - @Schema(description = "网址", example = "25682") | ||
| 74 | - @ExcelProperty("网址") | ||
| 75 | - private String website; | ||
| 76 | - | ||
| 77 | @Schema(description = "QQ", example = "25682") | 73 | @Schema(description = "QQ", example = "25682") |
| 78 | @ExcelProperty("QQ") | 74 | @ExcelProperty("QQ") |
| 79 | private String qq; | 75 | private String qq; |
| @@ -86,9 +82,15 @@ public class CrmClueRespVO { | @@ -86,9 +82,15 @@ public class CrmClueRespVO { | ||
| 86 | @ExcelProperty("email") | 82 | @ExcelProperty("email") |
| 87 | private String email; | 83 | private String email; |
| 88 | 84 | ||
| 89 | - @Schema(description = "地址", example = "北京市海淀区") | ||
| 90 | - @ExcelProperty("地址") | ||
| 91 | - private String address; | 85 | + @Schema(description = "地区编号", example = "1024") |
| 86 | + @ExcelProperty("地区编号") | ||
| 87 | + private Integer areaId; | ||
| 88 | + @Schema(description = "地区名称", example = "北京市") | ||
| 89 | + @ExcelProperty("地区名称") | ||
| 90 | + private String areaName; | ||
| 91 | + @Schema(description = "详细地址", example = "北京市成华大道") | ||
| 92 | + @ExcelProperty("详细地址") | ||
| 93 | + private String detailAddress; | ||
| 92 | 94 | ||
| 93 | @Schema(description = "所属行业", requiredMode = Schema.RequiredMode.REQUIRED, example = "13563") | 95 | @Schema(description = "所属行业", requiredMode = Schema.RequiredMode.REQUIRED, example = "13563") |
| 94 | @ExcelProperty(value = "所属行业", converter = DictConvert.class) | 96 | @ExcelProperty(value = "所属行业", converter = DictConvert.class) |
| @@ -105,10 +107,6 @@ public class CrmClueRespVO { | @@ -105,10 +107,6 @@ public class CrmClueRespVO { | ||
| 105 | @DictFormat(cn.iocoder.yudao.module.crm.enums.DictTypeConstants.CRM_CUSTOMER_SOURCE) | 107 | @DictFormat(cn.iocoder.yudao.module.crm.enums.DictTypeConstants.CRM_CUSTOMER_SOURCE) |
| 106 | private Integer source; | 108 | private Integer source; |
| 107 | 109 | ||
| 108 | - @Schema(description = "客户描述", example = "25682") | ||
| 109 | - @ExcelProperty("客户描述") | ||
| 110 | - private String description; | ||
| 111 | - | ||
| 112 | @Schema(description = "备注", example = "随便") | 110 | @Schema(description = "备注", example = "随便") |
| 113 | @ExcelProperty("备注") | 111 | @ExcelProperty("备注") |
| 114 | private String remark; | 112 | private String remark; |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/clue/vo/CrmClueSaveReqVO.java
| @@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.crm.enums.customer.CrmCustomerLevelEnum; | @@ -8,6 +8,7 @@ import cn.iocoder.yudao.module.crm.enums.customer.CrmCustomerLevelEnum; | ||
| 8 | import cn.iocoder.yudao.module.crm.framework.operatelog.core.CrmCustomerIndustryParseFunction; | 8 | import cn.iocoder.yudao.module.crm.framework.operatelog.core.CrmCustomerIndustryParseFunction; |
| 9 | import cn.iocoder.yudao.module.crm.framework.operatelog.core.CrmCustomerLevelParseFunction; | 9 | import cn.iocoder.yudao.module.crm.framework.operatelog.core.CrmCustomerLevelParseFunction; |
| 10 | import cn.iocoder.yudao.module.crm.framework.operatelog.core.CrmCustomerSourceParseFunction; | 10 | import cn.iocoder.yudao.module.crm.framework.operatelog.core.CrmCustomerSourceParseFunction; |
| 11 | +import cn.iocoder.yudao.module.crm.framework.operatelog.core.SysAreaParseFunction; | ||
| 11 | import com.mzt.logapi.starter.annotation.DiffLogField; | 12 | import com.mzt.logapi.starter.annotation.DiffLogField; |
| 12 | import io.swagger.v3.oas.annotations.media.Schema; | 13 | import io.swagger.v3.oas.annotations.media.Schema; |
| 13 | import jakarta.validation.constraints.Email; | 14 | import jakarta.validation.constraints.Email; |
| @@ -56,10 +57,6 @@ public class CrmClueSaveReqVO { | @@ -56,10 +57,6 @@ public class CrmClueSaveReqVO { | ||
| 56 | @Telephone | 57 | @Telephone |
| 57 | private String telephone; | 58 | private String telephone; |
| 58 | 59 | ||
| 59 | - @Schema(description = "网址", example = "https://www.baidu.com") | ||
| 60 | - @DiffLogField(name = "网址") | ||
| 61 | - private String website; | ||
| 62 | - | ||
| 63 | @Schema(description = "QQ", example = "123456789") | 60 | @Schema(description = "QQ", example = "123456789") |
| 64 | @DiffLogField(name = "QQ") | 61 | @DiffLogField(name = "QQ") |
| 65 | @Size(max = 20, message = "QQ长度不能超过 20 个字符") | 62 | @Size(max = 20, message = "QQ长度不能超过 20 个字符") |
| @@ -76,9 +73,13 @@ public class CrmClueSaveReqVO { | @@ -76,9 +73,13 @@ public class CrmClueSaveReqVO { | ||
| 76 | @Size(max = 255, message = "邮箱长度不能超过 255 个字符") | 73 | @Size(max = 255, message = "邮箱长度不能超过 255 个字符") |
| 77 | private String email; | 74 | private String email; |
| 78 | 75 | ||
| 79 | - @Schema(description = "地址", example = "北京市海淀区") | ||
| 80 | - @DiffLogField(name = "地址") | ||
| 81 | - private String address; | 76 | + @Schema(description = "地区编号", example = "20158") |
| 77 | + @DiffLogField(name = "地区编号", function = SysAreaParseFunction.NAME) | ||
| 78 | + private Integer areaId; | ||
| 79 | + | ||
| 80 | + @Schema(description = "详细地址", example = "北京市海淀区") | ||
| 81 | + @DiffLogField(name = "详细地址") | ||
| 82 | + private String detailAddress; | ||
| 82 | 83 | ||
| 83 | @Schema(description = "所属行业", example = "1") | 84 | @Schema(description = "所属行业", example = "1") |
| 84 | @DiffLogField(name = "所属行业", function = CrmCustomerIndustryParseFunction.NAME) | 85 | @DiffLogField(name = "所属行业", function = CrmCustomerIndustryParseFunction.NAME) |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/CrmCustomerController.java
| @@ -239,10 +239,10 @@ public class CrmCustomerController { | @@ -239,10 +239,10 @@ public class CrmCustomerController { | ||
| 239 | // 手动创建导出 demo | 239 | // 手动创建导出 demo |
| 240 | List<CrmCustomerImportExcelVO> list = Arrays.asList( | 240 | List<CrmCustomerImportExcelVO> list = Arrays.asList( |
| 241 | CrmCustomerImportExcelVO.builder().name("芋道").industryId(1).level(1).source(1).mobile("15601691300").telephone("") | 241 | CrmCustomerImportExcelVO.builder().name("芋道").industryId(1).level(1).source(1).mobile("15601691300").telephone("") |
| 242 | - .website("https://doc.iocoder.cn/").qq("").wechat("").email("yunai@iocoder.cn").description("").remark("") | 242 | + .qq("").wechat("").email("yunai@iocoder.cn").description("").remark("") |
| 243 | .areaId(null).detailAddress("").build(), | 243 | .areaId(null).detailAddress("").build(), |
| 244 | CrmCustomerImportExcelVO.builder().name("源码").industryId(1).level(1).source(1).mobile("15601691300").telephone("") | 244 | CrmCustomerImportExcelVO.builder().name("源码").industryId(1).level(1).source(1).mobile("15601691300").telephone("") |
| 245 | - .website("https://doc.iocoder.cn/").qq("").wechat("").email("yunai@iocoder.cn").description("").remark("") | 245 | + .qq("").wechat("").email("yunai@iocoder.cn").description("").remark("") |
| 246 | .areaId(null).detailAddress("").build() | 246 | .areaId(null).detailAddress("").build() |
| 247 | ); | 247 | ); |
| 248 | // 输出 | 248 | // 输出 |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/CrmCustomerImportExcelVO.java
| @@ -43,9 +43,6 @@ public class CrmCustomerImportExcelVO { | @@ -43,9 +43,6 @@ public class CrmCustomerImportExcelVO { | ||
| 43 | @ExcelProperty("电话") | 43 | @ExcelProperty("电话") |
| 44 | private String telephone; | 44 | private String telephone; |
| 45 | 45 | ||
| 46 | - @ExcelProperty("网址") | ||
| 47 | - private String website; | ||
| 48 | - | ||
| 49 | @ExcelProperty("QQ") | 46 | @ExcelProperty("QQ") |
| 50 | private String qq; | 47 | private String qq; |
| 51 | 48 |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/CrmCustomerRespVO.java
| @@ -65,10 +65,6 @@ public class CrmCustomerRespVO { | @@ -65,10 +65,6 @@ public class CrmCustomerRespVO { | ||
| 65 | private String telephone; | 65 | private String telephone; |
| 66 | 66 | ||
| 67 | @Schema(description = "负责人的用户编号", example = "25682") | 67 | @Schema(description = "负责人的用户编号", example = "25682") |
| 68 | - @ExcelProperty("网址") | ||
| 69 | - private String website; | ||
| 70 | - | ||
| 71 | - @Schema(description = "负责人的用户编号", example = "25682") | ||
| 72 | @ExcelProperty("QQ") | 68 | @ExcelProperty("QQ") |
| 73 | private String qq; | 69 | private String qq; |
| 74 | 70 | ||
| @@ -81,10 +77,6 @@ public class CrmCustomerRespVO { | @@ -81,10 +77,6 @@ public class CrmCustomerRespVO { | ||
| 81 | private String email; | 77 | private String email; |
| 82 | 78 | ||
| 83 | @Schema(description = "负责人的用户编号", example = "25682") | 79 | @Schema(description = "负责人的用户编号", example = "25682") |
| 84 | - @ExcelProperty("客户描述") | ||
| 85 | - private String description; | ||
| 86 | - | ||
| 87 | - @Schema(description = "负责人的用户编号", example = "25682") | ||
| 88 | @ExcelProperty("备注") | 80 | @ExcelProperty("备注") |
| 89 | private String remark; | 81 | private String remark; |
| 90 | 82 |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/customer/vo/CrmCustomerSaveReqVO.java
| @@ -58,10 +58,6 @@ public class CrmCustomerSaveReqVO { | @@ -58,10 +58,6 @@ public class CrmCustomerSaveReqVO { | ||
| 58 | @Telephone | 58 | @Telephone |
| 59 | private String telephone; | 59 | private String telephone; |
| 60 | 60 | ||
| 61 | - @Schema(description = "网址", example = "https://www.baidu.com") | ||
| 62 | - @DiffLogField(name = "网址") | ||
| 63 | - private String website; | ||
| 64 | - | ||
| 65 | @Schema(description = "QQ", example = "123456789") | 61 | @Schema(description = "QQ", example = "123456789") |
| 66 | @DiffLogField(name = "QQ") | 62 | @DiffLogField(name = "QQ") |
| 67 | @Size(max = 20, message = "QQ长度不能超过 20 个字符") | 63 | @Size(max = 20, message = "QQ长度不能超过 20 个字符") |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/clue/CrmClueDO.java
| @@ -81,10 +81,6 @@ public class CrmClueDO extends BaseDO { | @@ -81,10 +81,6 @@ public class CrmClueDO extends BaseDO { | ||
| 81 | */ | 81 | */ |
| 82 | private String telephone; | 82 | private String telephone; |
| 83 | /** | 83 | /** |
| 84 | - * 网址 | ||
| 85 | - */ | ||
| 86 | - private String website; | ||
| 87 | - /** | ||
| 88 | 84 | ||
| 89 | */ | 85 | */ |
| 90 | private String qq; | 86 | private String qq; |
| @@ -97,9 +93,15 @@ public class CrmClueDO extends BaseDO { | @@ -97,9 +93,15 @@ public class CrmClueDO extends BaseDO { | ||
| 97 | */ | 93 | */ |
| 98 | private String email; | 94 | private String email; |
| 99 | /** | 95 | /** |
| 100 | - * 地址 | 96 | + * 所在地 |
| 97 | + * | ||
| 98 | + * 关联 {@link cn.iocoder.yudao.framework.ip.core.Area#getId()} 字段 | ||
| 101 | */ | 99 | */ |
| 102 | - private String address; | 100 | + private Integer areaId; |
| 101 | + /** | ||
| 102 | + * 详细地址 | ||
| 103 | + */ | ||
| 104 | + private String detailAddress; | ||
| 103 | /** | 105 | /** |
| 104 | * 所属行业 | 106 | * 所属行业 |
| 105 | * | 107 | * |
| @@ -119,10 +121,6 @@ public class CrmClueDO extends BaseDO { | @@ -119,10 +121,6 @@ public class CrmClueDO extends BaseDO { | ||
| 119 | */ | 121 | */ |
| 120 | private Integer source; | 122 | private Integer source; |
| 121 | /** | 123 | /** |
| 122 | - * 客户描述 | ||
| 123 | - */ | ||
| 124 | - private String description; | ||
| 125 | - /** | ||
| 126 | * 备注 | 124 | * 备注 |
| 127 | */ | 125 | */ |
| 128 | private String remark; | 126 | private String remark; |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/customer/CrmCustomerDO.java
| @@ -80,10 +80,6 @@ public class CrmCustomerDO extends BaseDO { | @@ -80,10 +80,6 @@ public class CrmCustomerDO extends BaseDO { | ||
| 80 | */ | 80 | */ |
| 81 | private String telephone; | 81 | private String telephone; |
| 82 | /** | 82 | /** |
| 83 | - * 网址 | ||
| 84 | - */ | ||
| 85 | - private String website; | ||
| 86 | - /** | ||
| 87 | 83 | ||
| 88 | */ | 84 | */ |
| 89 | private String qq; | 85 | private String qq; |
| @@ -124,10 +120,6 @@ public class CrmCustomerDO extends BaseDO { | @@ -124,10 +120,6 @@ public class CrmCustomerDO extends BaseDO { | ||
| 124 | */ | 120 | */ |
| 125 | private Integer source; | 121 | private Integer source; |
| 126 | /** | 122 | /** |
| 127 | - * 客户描述 | ||
| 128 | - */ | ||
| 129 | - private String description; | ||
| 130 | - /** | ||
| 131 | * 备注 | 123 | * 备注 |
| 132 | */ | 124 | */ |
| 133 | private String remark; | 125 | private String remark; |
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/customer/bo/CrmCustomerCreateReqBO.java
| @@ -65,10 +65,6 @@ public class CrmCustomerCreateReqBO { | @@ -65,10 +65,6 @@ public class CrmCustomerCreateReqBO { | ||
| 65 | @Telephone | 65 | @Telephone |
| 66 | private String telephone; | 66 | private String telephone; |
| 67 | /** | 67 | /** |
| 68 | - * 网址 | ||
| 69 | - */ | ||
| 70 | - private String website; | ||
| 71 | - /** | ||
| 72 | 68 | ||
| 73 | */ | 69 | */ |
| 74 | private String qq; | 70 | private String qq; |
yudao-module-crm/yudao-module-crm-biz/src/test/resources/sql/clean.sql deleted
yudao-module-crm/yudao-module-crm-biz/src/test/resources/sql/create_tables.sql deleted
| 1 | -CREATE TABLE IF NOT EXISTS "crm_contract" ( | ||
| 2 | - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||
| 3 | - "name" varchar NOT NULL, | ||
| 4 | - "customer_id" bigint, | ||
| 5 | - "business_id" bigint, | ||
| 6 | - "process_instance_id" bigint, | ||
| 7 | - "order_date" varchar, | ||
| 8 | - "owner_user_id" bigint, | ||
| 9 | - "no" varchar, | ||
| 10 | - "start_time" varchar, | ||
| 11 | - "end_time" varchar, | ||
| 12 | - "price" int, | ||
| 13 | - "discount_percent" int, | ||
| 14 | - "product_price" int, | ||
| 15 | - "ro_user_ids" varchar, | ||
| 16 | - "rw_user_ids" varchar, | ||
| 17 | - "contact_id" bigint, | ||
| 18 | - "sign_user_id" bigint, | ||
| 19 | - "contact_last_time" varchar, | ||
| 20 | - "remark" varchar, | ||
| 21 | - "creator" varchar DEFAULT '', | ||
| 22 | - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| 23 | - "updater" varchar DEFAULT '', | ||
| 24 | - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 25 | - "deleted" bit NOT NULL DEFAULT FALSE, | ||
| 26 | - PRIMARY KEY ("id") | ||
| 27 | -) COMMENT '合同表'; | ||
| 28 | - | ||
| 29 | -CREATE TABLE IF NOT EXISTS "crm_clue" ( | ||
| 30 | - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||
| 31 | - "transform_status" bit NOT NULL, | ||
| 32 | - "follow_up_status" bit NOT NULL, | ||
| 33 | - "name" varchar NOT NULL, | ||
| 34 | - "customer_id" bigint NOT NULL, | ||
| 35 | - "contact_next_time" varchar, | ||
| 36 | - "telephone" varchar, | ||
| 37 | - "mobile" varchar, | ||
| 38 | - "address" varchar, | ||
| 39 | - "owner_user_id" bigint, | ||
| 40 | - "contact_last_time" varchar, | ||
| 41 | - "remark" varchar, | ||
| 42 | - "creator" varchar DEFAULT '', | ||
| 43 | - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| 44 | - "updater" varchar DEFAULT '', | ||
| 45 | - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 46 | - "deleted" bit NOT NULL DEFAULT FALSE, | ||
| 47 | - "tenant_id" bigint NOT NULL, | ||
| 48 | - PRIMARY KEY ("id") | ||
| 49 | -) COMMENT '线索表'; | ||
| 50 | - | ||
| 51 | -CREATE TABLE IF NOT EXISTS "crm_receivable" ( | ||
| 52 | - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||
| 53 | - "no" varchar, | ||
| 54 | - "plan_id" bigint, | ||
| 55 | - "customer_id" bigint, | ||
| 56 | - "contract_id" bigint, | ||
| 57 | - "check_status" int, | ||
| 58 | - "process_instance_id" bigint, | ||
| 59 | - "return_time" varchar, | ||
| 60 | - "return_type" varchar, | ||
| 61 | - "price" varchar, | ||
| 62 | - "owner_user_id" bigint, | ||
| 63 | - "batch_id" bigint, | ||
| 64 | - "sort" int, | ||
| 65 | - "data_scope" int, | ||
| 66 | - "data_scope_dept_ids" varchar, | ||
| 67 | - "status" int NOT NULL, | ||
| 68 | - "remark" varchar, | ||
| 69 | - "creator" varchar DEFAULT '', | ||
| 70 | - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| 71 | - "updater" varchar DEFAULT '', | ||
| 72 | - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 73 | - "deleted" bit NOT NULL DEFAULT FALSE, | ||
| 74 | - PRIMARY KEY ("id") | ||
| 75 | -) COMMENT '回款'; | ||
| 76 | - | ||
| 77 | -CREATE TABLE IF NOT EXISTS "crm_receivable_plan" ( | ||
| 78 | - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||
| 79 | - "index_no" bigint, | ||
| 80 | - "receivable_id" bigint, | ||
| 81 | - "status" int NOT NULL, | ||
| 82 | - "check_status" varchar, | ||
| 83 | - "process_instance_id" bigint, | ||
| 84 | - "price" varchar, | ||
| 85 | - "return_time" varchar, | ||
| 86 | - "remind_days" bigint, | ||
| 87 | - "remind_time" varchar, | ||
| 88 | - "customer_id" bigint, | ||
| 89 | - "contract_id" bigint, | ||
| 90 | - "owner_user_id" bigint, | ||
| 91 | - "sort" int, | ||
| 92 | - "remark" varchar, | ||
| 93 | - "creator" varchar DEFAULT '', | ||
| 94 | - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| 95 | - "updater" varchar DEFAULT '', | ||
| 96 | - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 97 | - "deleted" bit NOT NULL DEFAULT FALSE, | ||
| 98 | - PRIMARY KEY ("id") | ||
| 99 | -) COMMENT '回款计划'; | ||
| 100 | - | ||
| 101 | -CREATE TABLE IF NOT EXISTS "crm_customer" ( | ||
| 102 | - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||
| 103 | - "name" varchar(255), | ||
| 104 | - "follow_up_status" int NOT NULL, | ||
| 105 | - "lock_status" int NOT NULL, | ||
| 106 | - "deal_status" int NOT NULL, | ||
| 107 | - "industry_id" int, | ||
| 108 | - "level" int, | ||
| 109 | - "source" int, | ||
| 110 | - "mobile" varchar(255), | ||
| 111 | - "telephone" varchar(255), | ||
| 112 | - "website" varchar(255), | ||
| 113 | - "qq" varchar(255), | ||
| 114 | - "wechat" varchar(255), | ||
| 115 | - "email" varchar(255), | ||
| 116 | - "description" varchar(255), | ||
| 117 | - "remark" varchar(255), | ||
| 118 | - "owner_user_id" bigint, | ||
| 119 | - "area_id" int, | ||
| 120 | - "detail_address" varchar(255), | ||
| 121 | - "contact_last_time" datetime, | ||
| 122 | - "contact_next_time" datetime, | ||
| 123 | - "creator" varchar DEFAULT '', | ||
| 124 | - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| 125 | - "updater" varchar DEFAULT '', | ||
| 126 | - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 127 | - "deleted" bit NOT NULL DEFAULT FALSE, | ||
| 128 | - "tenant_id" bigint NOT NULL, | ||
| 129 | - PRIMARY KEY ("id") | ||
| 130 | -) COMMENT '客户表'; | ||
| 131 | - | ||
| 132 | -CREATE TABLE IF NOT EXISTS "crm_customer_limit_config" ( | ||
| 133 | - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||
| 134 | - "type" int NOT NULL, | ||
| 135 | - "user_ids" varchar, | ||
| 136 | - "dept_ids" varchar, | ||
| 137 | - "max_count" int NOT NULL, | ||
| 138 | - "deal_count_enabled" varchar, | ||
| 139 | - "creator" varchar DEFAULT '', | ||
| 140 | - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| 141 | - "updater" varchar DEFAULT '', | ||
| 142 | - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 143 | - "deleted" bit NOT NULL DEFAULT FALSE, | ||
| 144 | - "tenant_id" bigint NOT NULL, | ||
| 145 | - PRIMARY KEY ("id") | ||
| 146 | -) COMMENT '客户限制配置表'; | ||
| 147 | - | ||
| 148 | -CREATE TABLE IF NOT EXISTS "crm_permission" | ||
| 149 | -( | ||
| 150 | - "id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, | ||
| 151 | - "biz_id" bigint NOT NULL, | ||
| 152 | - "biz_type" int NOT NULL, | ||
| 153 | - "user_id" bigint NOT NULL, | ||
| 154 | - "level" int NOT NULL, | ||
| 155 | - "creator" varchar DEFAULT '', | ||
| 156 | - "create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
| 157 | - "updater" varchar DEFAULT '', | ||
| 158 | - "update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
| 159 | - "deleted" bit NOT NULL DEFAULT FALSE, | ||
| 160 | - "tenant_id" bigint NOT NULL, | ||
| 161 | - PRIMARY KEY ("id") | ||
| 162 | -) COMMENT '客户限制配置表'; | ||
| 163 | \ No newline at end of file | 0 | \ No newline at end of file |