Commit 95e9dc81c9c397078a8684dfbddc6599436f76fa

Authored by liuhongfeng
1 parent f1f180ff

【修改】回款计划和回款管理统一带上Crm前缀,防止和其他模块冲突。

Showing 32 changed files with 373 additions and 385 deletions
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/ReceivableController.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivableController.java
... ... @@ -5,9 +5,9 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
5 5 import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
6 6 import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
7 7 import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.*;
8   -import cn.iocoder.yudao.module.crm.convert.receivable.ReceivableConvert;
9   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivableDO;
10   -import cn.iocoder.yudao.module.crm.service.receivable.ReceivableService;
  8 +import cn.iocoder.yudao.module.crm.convert.receivable.CrmReceivableConvert;
  9 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivableDO;
  10 +import cn.iocoder.yudao.module.crm.service.receivable.CrmReceivableService;
11 11 import io.swagger.v3.oas.annotations.Operation;
12 12 import io.swagger.v3.oas.annotations.Parameter;
13 13 import io.swagger.v3.oas.annotations.tags.Tag;
... ... @@ -28,23 +28,23 @@ import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.E
28 28 @RestController
29 29 @RequestMapping("/crm/receivable")
30 30 @Validated
31   -public class ReceivableController {
  31 +public class CrmReceivableController {
32 32  
33 33 @Resource
34   - private ReceivableService receivableService;
  34 + private CrmReceivableService crmReceivableService;
35 35  
36 36 @PostMapping("/create")
37 37 @Operation(summary = "创建回款管理")
38 38 @PreAuthorize("@ss.hasPermission('crm:receivable:create')")
39   - public CommonResult<Long> createReceivable(@Valid @RequestBody ReceivableCreateReqVO createReqVO) {
40   - return success(receivableService.createReceivable(createReqVO));
  39 + public CommonResult<Long> createReceivable(@Valid @RequestBody CrmReceivableCreateReqVO createReqVO) {
  40 + return success(crmReceivableService.createReceivable(createReqVO));
41 41 }
42 42  
43 43 @PutMapping("/update")
44 44 @Operation(summary = "更新回款管理")
45 45 @PreAuthorize("@ss.hasPermission('crm:receivable:update')")
46   - public CommonResult<Boolean> updateReceivable(@Valid @RequestBody ReceivableUpdateReqVO updateReqVO) {
47   - receivableService.updateReceivable(updateReqVO);
  46 + public CommonResult<Boolean> updateReceivable(@Valid @RequestBody CrmReceivableUpdateReqVO updateReqVO) {
  47 + crmReceivableService.updateReceivable(updateReqVO);
48 48 return success(true);
49 49 }
50 50  
... ... @@ -53,7 +53,7 @@ public class ReceivableController {
53 53 @Parameter(name = "id", description = "编号", required = true)
54 54 @PreAuthorize("@ss.hasPermission('crm:receivable:delete')")
55 55 public CommonResult<Boolean> deleteReceivable(@RequestParam("id") Long id) {
56   - receivableService.deleteReceivable(id);
  56 + crmReceivableService.deleteReceivable(id);
57 57 return success(true);
58 58 }
59 59  
... ... @@ -61,29 +61,29 @@ public class ReceivableController {
61 61 @Operation(summary = "获得回款管理")
62 62 @Parameter(name = "id", description = "编号", required = true, example = "1024")
63 63 @PreAuthorize("@ss.hasPermission('crm:receivable:query')")
64   - public CommonResult<ReceivableRespVO> getReceivable(@RequestParam("id") Long id) {
65   - ReceivableDO receivable = receivableService.getReceivable(id);
66   - return success(ReceivableConvert.INSTANCE.convert(receivable));
  64 + public CommonResult<CrmReceivableRespVO> getReceivable(@RequestParam("id") Long id) {
  65 + CrmReceivableDO receivable = crmReceivableService.getReceivable(id);
  66 + return success(CrmReceivableConvert.INSTANCE.convert(receivable));
67 67 }
68 68  
69 69 @GetMapping("/page")
70 70 @Operation(summary = "获得回款管理分页")
71 71 @PreAuthorize("@ss.hasPermission('crm:receivable:query')")
72   - public CommonResult<PageResult<ReceivableRespVO>> getReceivablePage(@Valid ReceivablePageReqVO pageVO) {
73   - PageResult<ReceivableDO> pageResult = receivableService.getReceivablePage(pageVO);
74   - return success(ReceivableConvert.INSTANCE.convertPage(pageResult));
  72 + public CommonResult<PageResult<CrmReceivableRespVO>> getReceivablePage(@Valid CrmReceivablePageReqVO pageVO) {
  73 + PageResult<CrmReceivableDO> pageResult = crmReceivableService.getReceivablePage(pageVO);
  74 + return success(CrmReceivableConvert.INSTANCE.convertPage(pageResult));
75 75 }
76 76  
77 77 @GetMapping("/export-excel")
78 78 @Operation(summary = "导出回款管理 Excel")
79 79 @PreAuthorize("@ss.hasPermission('crm:receivable:export')")
80 80 @OperateLog(type = EXPORT)
81   - public void exportReceivableExcel(@Valid ReceivableExportReqVO exportReqVO,
  81 + public void exportReceivableExcel(@Valid CrmReceivableExportReqVO exportReqVO,
82 82 HttpServletResponse response) throws IOException {
83   - List<ReceivableDO> list = receivableService.getReceivableList(exportReqVO);
  83 + List<CrmReceivableDO> list = crmReceivableService.getReceivableList(exportReqVO);
84 84 // 导出 Excel
85   - List<ReceivableExcelVO> datas = ReceivableConvert.INSTANCE.convertList02(list);
86   - ExcelUtils.write(response, "回款管理.xls", "数据", ReceivableExcelVO.class, datas);
  85 + List<CrmReceivableExcelVO> datas = CrmReceivableConvert.INSTANCE.convertList02(list);
  86 + ExcelUtils.write(response, "回款管理.xls", "数据", CrmReceivableExcelVO.class, datas);
87 87 }
88 88  
89 89 }
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/ReceivablePlanController.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/CrmReceivablePlanController.java
... ... @@ -5,9 +5,9 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
5 5 import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
6 6 import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
7 7 import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.*;
8   -import cn.iocoder.yudao.module.crm.convert.receivable.ReceivablePlanConvert;
9   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivablePlanDO;
10   -import cn.iocoder.yudao.module.crm.service.receivable.ReceivablePlanService;
  8 +import cn.iocoder.yudao.module.crm.convert.receivable.CrmReceivablePlanConvert;
  9 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO;
  10 +import cn.iocoder.yudao.module.crm.service.receivable.CrmReceivablePlanService;
11 11 import io.swagger.v3.oas.annotations.Operation;
12 12 import io.swagger.v3.oas.annotations.Parameter;
13 13 import io.swagger.v3.oas.annotations.tags.Tag;
... ... @@ -28,23 +28,23 @@ import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.E
28 28 @RestController
29 29 @RequestMapping("/crm/receivable-plan")
30 30 @Validated
31   -public class ReceivablePlanController {
  31 +public class CrmReceivablePlanController {
32 32  
33 33 @Resource
34   - private ReceivablePlanService receivablePlanService;
  34 + private CrmReceivablePlanService crmReceivablePlanService;
35 35  
36 36 @PostMapping("/create")
37 37 @Operation(summary = "创建回款计划")
38 38 @PreAuthorize("@ss.hasPermission('crm:receivable-plan:create')")
39   - public CommonResult<Long> createReceivablePlan(@Valid @RequestBody ReceivablePlanCreateReqVO createReqVO) {
40   - return success(receivablePlanService.createReceivablePlan(createReqVO));
  39 + public CommonResult<Long> createReceivablePlan(@Valid @RequestBody CrmReceivablePlanCreateReqVO createReqVO) {
  40 + return success(crmReceivablePlanService.createReceivablePlan(createReqVO));
41 41 }
42 42  
43 43 @PutMapping("/update")
44 44 @Operation(summary = "更新回款计划")
45 45 @PreAuthorize("@ss.hasPermission('crm:receivable-plan:update')")
46   - public CommonResult<Boolean> updateReceivablePlan(@Valid @RequestBody ReceivablePlanUpdateReqVO updateReqVO) {
47   - receivablePlanService.updateReceivablePlan(updateReqVO);
  46 + public CommonResult<Boolean> updateReceivablePlan(@Valid @RequestBody CrmReceivablePlanUpdateReqVO updateReqVO) {
  47 + crmReceivablePlanService.updateReceivablePlan(updateReqVO);
48 48 return success(true);
49 49 }
50 50  
... ... @@ -53,7 +53,7 @@ public class ReceivablePlanController {
53 53 @Parameter(name = "id", description = "编号", required = true)
54 54 @PreAuthorize("@ss.hasPermission('crm:receivable-plan:delete')")
55 55 public CommonResult<Boolean> deleteReceivablePlan(@RequestParam("id") Long id) {
56   - receivablePlanService.deleteReceivablePlan(id);
  56 + crmReceivablePlanService.deleteReceivablePlan(id);
57 57 return success(true);
58 58 }
59 59  
... ... @@ -61,29 +61,29 @@ public class ReceivablePlanController {
61 61 @Operation(summary = "获得回款计划")
62 62 @Parameter(name = "id", description = "编号", required = true, example = "1024")
63 63 @PreAuthorize("@ss.hasPermission('crm:receivable-plan:query')")
64   - public CommonResult<ReceivablePlanRespVO> getReceivablePlan(@RequestParam("id") Long id) {
65   - ReceivablePlanDO receivablePlan = receivablePlanService.getReceivablePlan(id);
66   - return success(ReceivablePlanConvert.INSTANCE.convert(receivablePlan));
  64 + public CommonResult<CrmReceivablePlanRespVO> getReceivablePlan(@RequestParam("id") Long id) {
  65 + CrmReceivablePlanDO receivablePlan = crmReceivablePlanService.getReceivablePlan(id);
  66 + return success(CrmReceivablePlanConvert.INSTANCE.convert(receivablePlan));
67 67 }
68 68  
69 69 @GetMapping("/page")
70 70 @Operation(summary = "获得回款计划分页")
71 71 @PreAuthorize("@ss.hasPermission('crm:receivable-plan:query')")
72   - public CommonResult<PageResult<ReceivablePlanRespVO>> getReceivablePlanPage(@Valid ReceivablePlanPageReqVO pageVO) {
73   - PageResult<ReceivablePlanDO> pageResult = receivablePlanService.getReceivablePlanPage(pageVO);
74   - return success(ReceivablePlanConvert.INSTANCE.convertPage(pageResult));
  72 + public CommonResult<PageResult<CrmReceivablePlanRespVO>> getReceivablePlanPage(@Valid CrmReceivablePlanPageReqVO pageVO) {
  73 + PageResult<CrmReceivablePlanDO> pageResult = crmReceivablePlanService.getReceivablePlanPage(pageVO);
  74 + return success(CrmReceivablePlanConvert.INSTANCE.convertPage(pageResult));
75 75 }
76 76  
77 77 @GetMapping("/export-excel")
78 78 @Operation(summary = "导出回款计划 Excel")
79 79 @PreAuthorize("@ss.hasPermission('crm:receivable-plan:export')")
80 80 @OperateLog(type = EXPORT)
81   - public void exportReceivablePlanExcel(@Valid ReceivablePlanExportReqVO exportReqVO,
  81 + public void exportReceivablePlanExcel(@Valid CrmReceivablePlanExportReqVO exportReqVO,
82 82 HttpServletResponse response) throws IOException {
83   - List<ReceivablePlanDO> list = receivablePlanService.getReceivablePlanList(exportReqVO);
  83 + List<CrmReceivablePlanDO> list = crmReceivablePlanService.getReceivablePlanList(exportReqVO);
84 84 // 导出 Excel
85   - List<ReceivablePlanExcelVO> datas = ReceivablePlanConvert.INSTANCE.convertList02(list);
86   - ExcelUtils.write(response, "回款计划.xls", "数据", ReceivablePlanExcelVO.class, datas);
  85 + List<CrmReceivablePlanExcelVO> datas = CrmReceivablePlanConvert.INSTANCE.convertList02(list);
  86 + ExcelUtils.write(response, "回款计划.xls", "数据", CrmReceivablePlanExcelVO.class, datas);
87 87 }
88 88  
89 89 }
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivableBaseVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivableBaseVO.java
... ... @@ -6,8 +6,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
6 6 import lombok.Data;
7 7 import org.springframework.format.annotation.DateTimeFormat;
8 8  
9   -import javax.validation.constraints.NotNull;
10   -import java.math.BigDecimal;
11 9 import java.time.LocalDateTime;
12 10  
13 11 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
... ... @@ -17,7 +15,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
17 15 * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
18 16 */
19 17 @Data
20   -public class ReceivableBaseVO {
  18 +public class CrmReceivableBaseVO {
21 19  
22 20 @Schema(description = "回款编号",requiredMode = Schema.RequiredMode.REQUIRED, example = "31177")
23 21 private String no;
... ... @@ -57,4 +55,7 @@ public class ReceivableBaseVO {
57 55 @Schema(description = "备注", example = "备注")
58 56 private String remark;
59 57  
  58 + @Schema(description = "完成状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
  59 + private Integer status;
  60 +
60 61 }
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivableCreateReqVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivableCreateReqVO.java
1 1 package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo;
2 2  
3 3 import lombok.*;
4   -import java.util.*;
5 4 import io.swagger.v3.oas.annotations.media.Schema;
6   -import javax.validation.constraints.*;
7 5  
8 6 @Schema(description = "管理后台 - CRM 回款创建 Request VO")
9 7 @Data
10 8 @EqualsAndHashCode(callSuper = true)
11 9 @ToString(callSuper = true)
12   -public class ReceivableCreateReqVO extends ReceivableBaseVO {
  10 +public class CrmReceivableCreateReqVO extends CrmReceivableBaseVO {
13 11  
14 12 }
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivableExcelVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivableExcelVO.java
1 1 package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo;
2 2  
3 3 import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
4   -import io.swagger.v3.oas.annotations.media.Schema;
5 4 import lombok.*;
6   -import java.util.*;
7   -import java.time.LocalDateTime;
8   -import java.math.BigDecimal;
9   -import java.time.LocalDateTime;
  5 +
10 6 import java.time.LocalDateTime;
11 7  
12 8 import com.alibaba.excel.annotation.ExcelProperty;
... ... @@ -20,7 +16,7 @@ import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
20 16 * @author 赤焰
21 17 */
22 18 @Data
23   -public class ReceivableExcelVO {
  19 +public class CrmReceivableExcelVO {
24 20  
25 21 @ExcelProperty("ID")
26 22 private Long id;
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivableExportReqVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivableExportReqVO.java
... ... @@ -11,9 +11,9 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
11 11 /**
12 12 * @author 赤焰
13 13 */
14   -@Schema(description = "管理后台 - CRM 回款 Excel 导出 Request VO,参数和 ReceivablePageReqVO 是一致的")
  14 +@Schema(description = "管理后台 - CRM 回款 Excel 导出 Request VO,参数和 CrmReceivablePageReqVO 是一致的")
15 15 @Data
16   -public class ReceivableExportReqVO {
  16 +public class CrmReceivableExportReqVO {
17 17  
18 18 @Schema(description = "回款编号")
19 19 private String no;
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePageReqVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivablePageReqVO.java
... ... @@ -7,7 +7,6 @@ import lombok.EqualsAndHashCode;
7 7 import lombok.ToString;
8 8 import org.springframework.format.annotation.DateTimeFormat;
9 9  
10   -import java.math.BigDecimal;
11 10 import java.time.LocalDateTime;
12 11  
13 12 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
... ... @@ -16,7 +15,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
16 15 @Data
17 16 @EqualsAndHashCode(callSuper = true)
18 17 @ToString(callSuper = true)
19   -public class ReceivablePageReqVO extends PageParam {
  18 +public class CrmReceivablePageReqVO extends PageParam {
20 19  
21 20 @Schema(description = "回款编号")
22 21 private String no;
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanBaseVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivablePlanBaseVO.java
... ... @@ -15,7 +15,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
15 15 * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
16 16 */
17 17 @Data
18   -public class ReceivablePlanBaseVO {
  18 +public class CrmReceivablePlanBaseVO {
19 19  
20 20 @Schema(description = "期数", example = "1")
21 21 private Integer period;
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanCreateReqVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivablePlanCreateReqVO.java
1 1 package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo;
2 2  
3 3 import lombok.*;
4   -import java.util.*;
5 4 import io.swagger.v3.oas.annotations.media.Schema;
6   -import javax.validation.constraints.*;
7 5  
8 6 @Schema(description = "管理后台 - CRM 回款计划创建 Request VO")
9 7 @Data
10 8 @EqualsAndHashCode(callSuper = true)
11 9 @ToString(callSuper = true)
12   -public class ReceivablePlanCreateReqVO extends ReceivablePlanBaseVO {
  10 +public class CrmReceivablePlanCreateReqVO extends CrmReceivablePlanBaseVO {
13 11  
14 12 }
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExcelVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivablePlanExcelVO.java
... ... @@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo;
3 3 import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
4 4 import lombok.*;
5 5  
6   -import java.math.BigDecimal;
7 6 import java.time.LocalDateTime;
8 7  
9 8 import com.alibaba.excel.annotation.ExcelProperty;
... ... @@ -17,7 +16,7 @@ import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
17 16 * @author 芋道源码
18 17 */
19 18 @Data
20   -public class ReceivablePlanExcelVO {
  19 +public class CrmReceivablePlanExcelVO {
21 20  
22 21 @ExcelProperty("ID")
23 22 private Long id;
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExportReqVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivablePlanExportReqVO.java
... ... @@ -8,9 +8,9 @@ import org.springframework.format.annotation.DateTimeFormat;
8 8  
9 9 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
10 10  
11   -@Schema(description = "管理后台 - CRM 回款计划 Excel 导出 Request VO,参数和 ReceivablePlanPageReqVO 是一致的")
  11 +@Schema(description = "管理后台 - CRM 回款计划 Excel 导出 Request VO,参数和 CrmReceivablePlanPageReqVO 是一致的")
12 12 @Data
13   -public class ReceivablePlanExportReqVO {
  13 +public class CrmReceivablePlanExportReqVO {
14 14  
15 15 @Schema(description = "期数")
16 16 private Integer period;
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanPageReqVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivablePlanPageReqVO.java
... ... @@ -15,7 +15,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
15 15 @Data
16 16 @EqualsAndHashCode(callSuper = true)
17 17 @ToString(callSuper = true)
18   -public class ReceivablePlanPageReqVO extends PageParam {
  18 +public class CrmReceivablePlanPageReqVO extends PageParam {
19 19  
20 20 @Schema(description = "完成状态", example = "2")
21 21 private Integer status;
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanRespVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivablePlanRespVO.java
... ... @@ -8,7 +8,7 @@ import java.time.LocalDateTime;
8 8 @Data
9 9 @EqualsAndHashCode(callSuper = true)
10 10 @ToString(callSuper = true)
11   -public class ReceivablePlanRespVO extends ReceivablePlanBaseVO {
  11 +public class CrmReceivablePlanRespVO extends CrmReceivablePlanBaseVO {
12 12  
13 13 @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25153")
14 14 private Long id;
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanUpdateReqVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivablePlanUpdateReqVO.java
... ... @@ -2,14 +2,14 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo;
2 2  
3 3 import io.swagger.v3.oas.annotations.media.Schema;
4 4 import lombok.*;
5   -import java.util.*;
  5 +
6 6 import javax.validation.constraints.*;
7 7  
8 8 @Schema(description = "管理后台 - CRM 回款计划更新 Request VO")
9 9 @Data
10 10 @EqualsAndHashCode(callSuper = true)
11 11 @ToString(callSuper = true)
12   -public class ReceivablePlanUpdateReqVO extends ReceivablePlanBaseVO {
  12 +public class CrmReceivablePlanUpdateReqVO extends CrmReceivablePlanBaseVO {
13 13  
14 14 @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25153")
15 15 @NotNull(message = "ID不能为空")
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivableRespVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivableRespVO.java
... ... @@ -8,7 +8,7 @@ import java.time.LocalDateTime;
8 8 @Data
9 9 @EqualsAndHashCode(callSuper = true)
10 10 @ToString(callSuper = true)
11   -public class ReceivableRespVO extends ReceivableBaseVO {
  11 +public class CrmReceivableRespVO extends CrmReceivableBaseVO {
12 12  
13 13 @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25787")
14 14 private Long id;
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivableUpdateReqVO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/CrmReceivableUpdateReqVO.java
... ... @@ -2,14 +2,14 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo;
2 2  
3 3 import io.swagger.v3.oas.annotations.media.Schema;
4 4 import lombok.*;
5   -import java.util.*;
  5 +
6 6 import javax.validation.constraints.*;
7 7  
8 8 @Schema(description = "管理后台 - CRM 回款更新 Request VO")
9 9 @Data
10 10 @EqualsAndHashCode(callSuper = true)
11 11 @ToString(callSuper = true)
12   -public class ReceivableUpdateReqVO extends ReceivableBaseVO {
  12 +public class CrmReceivableUpdateReqVO extends CrmReceivableBaseVO {
13 13  
14 14 @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "25787")
15 15 @NotNull(message = "ID不能为空")
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/receivable/ReceivableConvert.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/receivable/CrmReceivableConvert.java
... ... @@ -4,10 +4,10 @@ import java.util.*;
4 4  
5 5 import cn.iocoder.yudao.framework.common.pojo.PageResult;
6 6  
  7 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivableDO;
7 8 import org.mapstruct.Mapper;
8 9 import org.mapstruct.factory.Mappers;
9 10 import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.*;
10   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivableDO;
11 11  
12 12 /**
13 13 * 回款管理 Convert
... ... @@ -15,20 +15,20 @@ import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivableDO;
15 15 * @author 赤焰
16 16 */
17 17 @Mapper
18   -public interface ReceivableConvert {
  18 +public interface CrmReceivableConvert {
19 19  
20   - ReceivableConvert INSTANCE = Mappers.getMapper(ReceivableConvert.class);
  20 + CrmReceivableConvert INSTANCE = Mappers.getMapper(CrmReceivableConvert.class);
21 21  
22   - ReceivableDO convert(ReceivableCreateReqVO bean);
  22 + CrmReceivableDO convert(CrmReceivableCreateReqVO bean);
23 23  
24   - ReceivableDO convert(ReceivableUpdateReqVO bean);
  24 + CrmReceivableDO convert(CrmReceivableUpdateReqVO bean);
25 25  
26   - ReceivableRespVO convert(ReceivableDO bean);
  26 + CrmReceivableRespVO convert(CrmReceivableDO bean);
27 27  
28   - List<ReceivableRespVO> convertList(List<ReceivableDO> list);
  28 + List<CrmReceivableRespVO> convertList(List<CrmReceivableDO> list);
29 29  
30   - PageResult<ReceivableRespVO> convertPage(PageResult<ReceivableDO> page);
  30 + PageResult<CrmReceivableRespVO> convertPage(PageResult<CrmReceivableDO> page);
31 31  
32   - List<ReceivableExcelVO> convertList02(List<ReceivableDO> list);
  32 + List<CrmReceivableExcelVO> convertList02(List<CrmReceivableDO> list);
33 33  
34 34 }
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/receivable/ReceivablePlanConvert.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/convert/receivable/CrmReceivablePlanConvert.java
... ... @@ -4,10 +4,10 @@ import java.util.*;
4 4  
5 5 import cn.iocoder.yudao.framework.common.pojo.PageResult;
6 6  
  7 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO;
7 8 import org.mapstruct.Mapper;
8 9 import org.mapstruct.factory.Mappers;
9 10 import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.*;
10   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivablePlanDO;
11 11  
12 12 /**
13 13 * 回款计划 Convert
... ... @@ -15,20 +15,20 @@ import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivablePlanDO;
15 15 * @author 芋道源码
16 16 */
17 17 @Mapper
18   -public interface ReceivablePlanConvert {
  18 +public interface CrmReceivablePlanConvert {
19 19  
20   - ReceivablePlanConvert INSTANCE = Mappers.getMapper(ReceivablePlanConvert.class);
  20 + CrmReceivablePlanConvert INSTANCE = Mappers.getMapper(CrmReceivablePlanConvert.class);
21 21  
22   - ReceivablePlanDO convert(ReceivablePlanCreateReqVO bean);
  22 + CrmReceivablePlanDO convert(CrmReceivablePlanCreateReqVO bean);
23 23  
24   - ReceivablePlanDO convert(ReceivablePlanUpdateReqVO bean);
  24 + CrmReceivablePlanDO convert(CrmReceivablePlanUpdateReqVO bean);
25 25  
26   - ReceivablePlanRespVO convert(ReceivablePlanDO bean);
  26 + CrmReceivablePlanRespVO convert(CrmReceivablePlanDO bean);
27 27  
28   - List<ReceivablePlanRespVO> convertList(List<ReceivablePlanDO> list);
  28 + List<CrmReceivablePlanRespVO> convertList(List<CrmReceivablePlanDO> list);
29 29  
30   - PageResult<ReceivablePlanRespVO> convertPage(PageResult<ReceivablePlanDO> page);
  30 + PageResult<CrmReceivablePlanRespVO> convertPage(PageResult<CrmReceivablePlanDO> page);
31 31  
32   - List<ReceivablePlanExcelVO> convertList02(List<ReceivablePlanDO> list);
  32 + List<CrmReceivablePlanExcelVO> convertList02(List<CrmReceivablePlanDO> list);
33 33  
34 34 }
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/receivable/ReceivableDO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/receivable/CrmReceivableDO.java
... ... @@ -21,7 +21,7 @@ import java.time.LocalDateTime;
21 21 @Builder
22 22 @NoArgsConstructor
23 23 @AllArgsConstructor
24   -public class ReceivableDO extends BaseDO {
  24 +public class CrmReceivableDO extends BaseDO {
25 25  
26 26 /**
27 27 * ID
... ... @@ -35,7 +35,7 @@ public class ReceivableDO extends BaseDO {
35 35 /**
36 36 * 回款计划
37 37 *
38   - * 对应实体 {@link cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivablePlanDO}
  38 + * 对应实体 {@link CrmReceivablePlanDO}
39 39 */
40 40 private Long planId;
41 41 /**
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/receivable/ReceivablePlanDO.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/receivable/CrmReceivablePlanDO.java
... ... @@ -2,7 +2,6 @@ package cn.iocoder.yudao.module.crm.dal.dataobject.receivable;
2 2  
3 3 import lombok.*;
4 4  
5   -import java.math.BigDecimal;
6 5 import java.time.LocalDateTime;
7 6  
8 7 import com.baomidou.mybatisplus.annotation.*;
... ... @@ -21,7 +20,7 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
21 20 @Builder
22 21 @NoArgsConstructor
23 22 @AllArgsConstructor
24   -public class ReceivablePlanDO extends BaseDO {
  23 +public class CrmReceivablePlanDO extends BaseDO {
25 24  
26 25 /**
27 26 * ID
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/CrmReceivableMapper.java 0 → 100644
  1 +package cn.iocoder.yudao.module.crm.dal.mysql.receivable;
  2 +
  3 +import java.util.*;
  4 +
  5 +import cn.iocoder.yudao.framework.common.pojo.PageResult;
  6 +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
  7 +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
  8 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivableDO;
  9 +import org.apache.ibatis.annotations.Mapper;
  10 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.*;
  11 +
  12 +/**
  13 + * 回款管理 Mapper
  14 + *
  15 + * @author 赤焰
  16 + */
  17 +@Mapper
  18 +public interface CrmReceivableMapper extends BaseMapperX<CrmReceivableDO> {
  19 +
  20 + default PageResult<CrmReceivableDO> selectPage(CrmReceivablePageReqVO reqVO) {
  21 + return selectPage(reqVO, new LambdaQueryWrapperX<CrmReceivableDO>()
  22 + .eqIfPresent(CrmReceivableDO::getNo, reqVO.getNo())
  23 + .eqIfPresent(CrmReceivableDO::getPlanId, reqVO.getPlanId())
  24 + .eqIfPresent(CrmReceivableDO::getCustomerId, reqVO.getCustomerId())
  25 + .eqIfPresent(CrmReceivableDO::getContractId, reqVO.getContractId())
  26 + .eqIfPresent(CrmReceivableDO::getCheckStatus, reqVO.getCheckStatus())
  27 + .betweenIfPresent(CrmReceivableDO::getReturnTime, reqVO.getReturnTime())
  28 + .eqIfPresent(CrmReceivableDO::getReturnType, reqVO.getReturnType())
  29 + .eqIfPresent(CrmReceivableDO::getPrice, reqVO.getPrice())
  30 + .eqIfPresent(CrmReceivableDO::getOwnerUserId, reqVO.getOwnerUserId())
  31 + .eqIfPresent(CrmReceivableDO::getStatus, reqVO.getStatus())
  32 + .betweenIfPresent(CrmReceivableDO::getCreateTime, reqVO.getCreateTime())
  33 + .orderByDesc(CrmReceivableDO::getId));
  34 + }
  35 +
  36 + default List<CrmReceivableDO> selectList(CrmReceivableExportReqVO reqVO) {
  37 + return selectList(new LambdaQueryWrapperX<CrmReceivableDO>()
  38 + .eqIfPresent(CrmReceivableDO::getNo, reqVO.getNo())
  39 + .eqIfPresent(CrmReceivableDO::getPlanId, reqVO.getPlanId())
  40 + .eqIfPresent(CrmReceivableDO::getCustomerId, reqVO.getCustomerId())
  41 + .eqIfPresent(CrmReceivableDO::getContractId, reqVO.getContractId())
  42 + .eqIfPresent(CrmReceivableDO::getCheckStatus, reqVO.getCheckStatus())
  43 + .betweenIfPresent(CrmReceivableDO::getReturnTime, reqVO.getReturnTime())
  44 + .eqIfPresent(CrmReceivableDO::getReturnType, reqVO.getReturnType())
  45 + .eqIfPresent(CrmReceivableDO::getPrice, reqVO.getPrice())
  46 + .eqIfPresent(CrmReceivableDO::getOwnerUserId, reqVO.getOwnerUserId())
  47 + .eqIfPresent(CrmReceivableDO::getBatchId, reqVO.getBatchId())
  48 + .eqIfPresent(CrmReceivableDO::getStatus, reqVO.getStatus())
  49 + .eqIfPresent(CrmReceivableDO::getRemark, reqVO.getRemark())
  50 + .betweenIfPresent(CrmReceivableDO::getCreateTime, reqVO.getCreateTime())
  51 + .orderByDesc(CrmReceivableDO::getId));
  52 + }
  53 +
  54 +}
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/CrmReceivablePlanMapper.java 0 → 100644
  1 +package cn.iocoder.yudao.module.crm.dal.mysql.receivable;
  2 +
  3 +import java.util.*;
  4 +
  5 +import cn.iocoder.yudao.framework.common.pojo.PageResult;
  6 +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
  7 +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
  8 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO;
  9 +import org.apache.ibatis.annotations.Mapper;
  10 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.*;
  11 +
  12 +/**
  13 + * 回款计划 Mapper
  14 + *
  15 + * @author 芋道源码
  16 + */
  17 +@Mapper
  18 +public interface CrmReceivablePlanMapper extends BaseMapperX<CrmReceivablePlanDO> {
  19 +
  20 + default PageResult<CrmReceivablePlanDO> selectPage(CrmReceivablePlanPageReqVO reqVO) {
  21 + return selectPage(reqVO, new LambdaQueryWrapperX<CrmReceivablePlanDO>()
  22 + .eqIfPresent(CrmReceivablePlanDO::getStatus, reqVO.getStatus())
  23 + .eqIfPresent(CrmReceivablePlanDO::getCheckStatus, reqVO.getCheckStatus())
  24 + .betweenIfPresent(CrmReceivablePlanDO::getReturnTime, reqVO.getReturnTime())
  25 + .betweenIfPresent(CrmReceivablePlanDO::getRemindTime, reqVO.getRemindTime())
  26 + .eqIfPresent(CrmReceivablePlanDO::getCustomerId, reqVO.getCustomerId())
  27 + .eqIfPresent(CrmReceivablePlanDO::getContractId, reqVO.getContractId())
  28 + .eqIfPresent(CrmReceivablePlanDO::getOwnerUserId, reqVO.getOwnerUserId())
  29 + .betweenIfPresent(CrmReceivablePlanDO::getCreateTime, reqVO.getCreateTime())
  30 + .orderByDesc(CrmReceivablePlanDO::getId));
  31 + }
  32 +
  33 + default List<CrmReceivablePlanDO> selectList(CrmReceivablePlanExportReqVO reqVO) {
  34 + return selectList(new LambdaQueryWrapperX<CrmReceivablePlanDO>()
  35 + .eqIfPresent(CrmReceivablePlanDO::getPeriod, reqVO.getPeriod())
  36 + .eqIfPresent(CrmReceivablePlanDO::getStatus, reqVO.getStatus())
  37 + .eqIfPresent(CrmReceivablePlanDO::getCheckStatus, reqVO.getCheckStatus())
  38 + .betweenIfPresent(CrmReceivablePlanDO::getReturnTime, reqVO.getReturnTime())
  39 + .eqIfPresent(CrmReceivablePlanDO::getRemindDays, reqVO.getRemindDays())
  40 + .betweenIfPresent(CrmReceivablePlanDO::getRemindTime, reqVO.getRemindTime())
  41 + .eqIfPresent(CrmReceivablePlanDO::getCustomerId, reqVO.getCustomerId())
  42 + .eqIfPresent(CrmReceivablePlanDO::getContractId, reqVO.getContractId())
  43 + .eqIfPresent(CrmReceivablePlanDO::getOwnerUserId, reqVO.getOwnerUserId())
  44 + .eqIfPresent(CrmReceivablePlanDO::getRemark, reqVO.getRemark())
  45 + .betweenIfPresent(CrmReceivablePlanDO::getCreateTime, reqVO.getCreateTime())
  46 + .orderByDesc(CrmReceivablePlanDO::getId));
  47 + }
  48 +
  49 +}
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/ReceivableMapper.java deleted
1   -package cn.iocoder.yudao.module.crm.dal.mysql.receivable;
2   -
3   -import java.util.*;
4   -
5   -import cn.iocoder.yudao.framework.common.pojo.PageResult;
6   -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
7   -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
8   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivableDO;
9   -import org.apache.ibatis.annotations.Mapper;
10   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.*;
11   -
12   -/**
13   - * 回款管理 Mapper
14   - *
15   - * @author 赤焰
16   - */
17   -@Mapper
18   -public interface ReceivableMapper extends BaseMapperX<ReceivableDO> {
19   -
20   - default PageResult<ReceivableDO> selectPage(ReceivablePageReqVO reqVO) {
21   - return selectPage(reqVO, new LambdaQueryWrapperX<ReceivableDO>()
22   - .eqIfPresent(ReceivableDO::getNo, reqVO.getNo())
23   - .eqIfPresent(ReceivableDO::getPlanId, reqVO.getPlanId())
24   - .eqIfPresent(ReceivableDO::getCustomerId, reqVO.getCustomerId())
25   - .eqIfPresent(ReceivableDO::getContractId, reqVO.getContractId())
26   - .eqIfPresent(ReceivableDO::getCheckStatus, reqVO.getCheckStatus())
27   - .betweenIfPresent(ReceivableDO::getReturnTime, reqVO.getReturnTime())
28   - .eqIfPresent(ReceivableDO::getReturnType, reqVO.getReturnType())
29   - .eqIfPresent(ReceivableDO::getPrice, reqVO.getPrice())
30   - .eqIfPresent(ReceivableDO::getOwnerUserId, reqVO.getOwnerUserId())
31   - .eqIfPresent(ReceivableDO::getStatus, reqVO.getStatus())
32   - .betweenIfPresent(ReceivableDO::getCreateTime, reqVO.getCreateTime())
33   - .orderByDesc(ReceivableDO::getId));
34   - }
35   -
36   - default List<ReceivableDO> selectList(ReceivableExportReqVO reqVO) {
37   - return selectList(new LambdaQueryWrapperX<ReceivableDO>()
38   - .eqIfPresent(ReceivableDO::getNo, reqVO.getNo())
39   - .eqIfPresent(ReceivableDO::getPlanId, reqVO.getPlanId())
40   - .eqIfPresent(ReceivableDO::getCustomerId, reqVO.getCustomerId())
41   - .eqIfPresent(ReceivableDO::getContractId, reqVO.getContractId())
42   - .eqIfPresent(ReceivableDO::getCheckStatus, reqVO.getCheckStatus())
43   - .betweenIfPresent(ReceivableDO::getReturnTime, reqVO.getReturnTime())
44   - .eqIfPresent(ReceivableDO::getReturnType, reqVO.getReturnType())
45   - .eqIfPresent(ReceivableDO::getPrice, reqVO.getPrice())
46   - .eqIfPresent(ReceivableDO::getOwnerUserId, reqVO.getOwnerUserId())
47   - .eqIfPresent(ReceivableDO::getBatchId, reqVO.getBatchId())
48   - .eqIfPresent(ReceivableDO::getStatus, reqVO.getStatus())
49   - .eqIfPresent(ReceivableDO::getRemark, reqVO.getRemark())
50   - .betweenIfPresent(ReceivableDO::getCreateTime, reqVO.getCreateTime())
51   - .orderByDesc(ReceivableDO::getId));
52   - }
53   -
54   -}
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/ReceivablePlanMapper.java deleted
1   -package cn.iocoder.yudao.module.crm.dal.mysql.receivable;
2   -
3   -import java.util.*;
4   -
5   -import cn.iocoder.yudao.framework.common.pojo.PageResult;
6   -import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
7   -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
8   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivablePlanDO;
9   -import org.apache.ibatis.annotations.Mapper;
10   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.*;
11   -
12   -/**
13   - * 回款计划 Mapper
14   - *
15   - * @author 芋道源码
16   - */
17   -@Mapper
18   -public interface ReceivablePlanMapper extends BaseMapperX<ReceivablePlanDO> {
19   -
20   - default PageResult<ReceivablePlanDO> selectPage(ReceivablePlanPageReqVO reqVO) {
21   - return selectPage(reqVO, new LambdaQueryWrapperX<ReceivablePlanDO>()
22   - .eqIfPresent(ReceivablePlanDO::getStatus, reqVO.getStatus())
23   - .eqIfPresent(ReceivablePlanDO::getCheckStatus, reqVO.getCheckStatus())
24   - .betweenIfPresent(ReceivablePlanDO::getReturnTime, reqVO.getReturnTime())
25   - .betweenIfPresent(ReceivablePlanDO::getRemindTime, reqVO.getRemindTime())
26   - .eqIfPresent(ReceivablePlanDO::getCustomerId, reqVO.getCustomerId())
27   - .eqIfPresent(ReceivablePlanDO::getContractId, reqVO.getContractId())
28   - .eqIfPresent(ReceivablePlanDO::getOwnerUserId, reqVO.getOwnerUserId())
29   - .betweenIfPresent(ReceivablePlanDO::getCreateTime, reqVO.getCreateTime())
30   - .orderByDesc(ReceivablePlanDO::getId));
31   - }
32   -
33   - default List<ReceivablePlanDO> selectList(ReceivablePlanExportReqVO reqVO) {
34   - return selectList(new LambdaQueryWrapperX<ReceivablePlanDO>()
35   - .eqIfPresent(ReceivablePlanDO::getPeriod, reqVO.getPeriod())
36   - .eqIfPresent(ReceivablePlanDO::getStatus, reqVO.getStatus())
37   - .eqIfPresent(ReceivablePlanDO::getCheckStatus, reqVO.getCheckStatus())
38   - .betweenIfPresent(ReceivablePlanDO::getReturnTime, reqVO.getReturnTime())
39   - .eqIfPresent(ReceivablePlanDO::getRemindDays, reqVO.getRemindDays())
40   - .betweenIfPresent(ReceivablePlanDO::getRemindTime, reqVO.getRemindTime())
41   - .eqIfPresent(ReceivablePlanDO::getCustomerId, reqVO.getCustomerId())
42   - .eqIfPresent(ReceivablePlanDO::getContractId, reqVO.getContractId())
43   - .eqIfPresent(ReceivablePlanDO::getOwnerUserId, reqVO.getOwnerUserId())
44   - .eqIfPresent(ReceivablePlanDO::getRemark, reqVO.getRemark())
45   - .betweenIfPresent(ReceivablePlanDO::getCreateTime, reqVO.getCreateTime())
46   - .orderByDesc(ReceivablePlanDO::getId));
47   - }
48   -
49   -}
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivablePlanService.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanService.java
... ... @@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.crm.service.receivable;
3 3 import java.util.*;
4 4 import javax.validation.*;
5 5 import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.*;
6   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivablePlanDO;
  6 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO;
7 7 import cn.iocoder.yudao.framework.common.pojo.PageResult;
8 8  
9 9 /**
... ... @@ -11,7 +11,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
11 11 *
12 12 * @author 芋道源码
13 13 */
14   -public interface ReceivablePlanService {
  14 +public interface CrmReceivablePlanService {
15 15  
16 16 /**
17 17 * 创建回款计划
... ... @@ -19,14 +19,14 @@ public interface ReceivablePlanService {
19 19 * @param createReqVO 创建信息
20 20 * @return 编号
21 21 */
22   - Long createReceivablePlan(@Valid ReceivablePlanCreateReqVO createReqVO);
  22 + Long createReceivablePlan(@Valid CrmReceivablePlanCreateReqVO createReqVO);
23 23  
24 24 /**
25 25 * 更新回款计划
26 26 *
27 27 * @param updateReqVO 更新信息
28 28 */
29   - void updateReceivablePlan(@Valid ReceivablePlanUpdateReqVO updateReqVO);
  29 + void updateReceivablePlan(@Valid CrmReceivablePlanUpdateReqVO updateReqVO);
30 30  
31 31 /**
32 32 * 删除回款计划
... ... @@ -41,7 +41,7 @@ public interface ReceivablePlanService {
41 41 * @param id 编号
42 42 * @return 回款计划
43 43 */
44   - ReceivablePlanDO getReceivablePlan(Long id);
  44 + CrmReceivablePlanDO getReceivablePlan(Long id);
45 45  
46 46 /**
47 47 * 获得回款计划列表
... ... @@ -49,7 +49,7 @@ public interface ReceivablePlanService {
49 49 * @param ids 编号
50 50 * @return 回款计划列表
51 51 */
52   - List<ReceivablePlanDO> getReceivablePlanList(Collection<Long> ids);
  52 + List<CrmReceivablePlanDO> getReceivablePlanList(Collection<Long> ids);
53 53  
54 54 /**
55 55 * 获得回款计划分页
... ... @@ -57,7 +57,7 @@ public interface ReceivablePlanService {
57 57 * @param pageReqVO 分页查询
58 58 * @return 回款计划分页
59 59 */
60   - PageResult<ReceivablePlanDO> getReceivablePlanPage(ReceivablePlanPageReqVO pageReqVO);
  60 + PageResult<CrmReceivablePlanDO> getReceivablePlanPage(CrmReceivablePlanPageReqVO pageReqVO);
61 61  
62 62 /**
63 63 * 获得回款计划列表, 用于 Excel 导出
... ... @@ -65,6 +65,6 @@ public interface ReceivablePlanService {
65 65 * @param exportReqVO 查询条件
66 66 * @return 回款计划列表
67 67 */
68   - List<ReceivablePlanDO> getReceivablePlanList(ReceivablePlanExportReqVO exportReqVO);
  68 + List<CrmReceivablePlanDO> getReceivablePlanList(CrmReceivablePlanExportReqVO exportReqVO);
69 69  
70 70 }
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivablePlanServiceImpl.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanServiceImpl.java
... ... @@ -5,16 +5,15 @@ import cn.hutool.core.collection.ListUtil;
5 5 import cn.hutool.core.util.ObjectUtil;
6 6 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
7 7 import cn.iocoder.yudao.framework.common.pojo.PageResult;
8   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivablePlanCreateReqVO;
9   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivablePlanExportReqVO;
10   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivablePlanPageReqVO;
11   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivablePlanUpdateReqVO;
12   -import cn.iocoder.yudao.module.crm.convert.receivable.ReceivablePlanConvert;
  8 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivablePlanCreateReqVO;
  9 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivablePlanExportReqVO;
  10 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivablePlanPageReqVO;
  11 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivablePlanUpdateReqVO;
  12 +import cn.iocoder.yudao.module.crm.convert.receivable.CrmReceivablePlanConvert;
13 13 import cn.iocoder.yudao.module.crm.dal.dataobject.contract.ContractDO;
14 14 import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO;
15   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivableDO;
16   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivablePlanDO;
17   -import cn.iocoder.yudao.module.crm.dal.mysql.receivable.ReceivablePlanMapper;
  15 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO;
  16 +import cn.iocoder.yudao.module.crm.dal.mysql.receivable.CrmReceivablePlanMapper;
18 17 import cn.iocoder.yudao.module.crm.enums.AuditStatusEnum;
19 18 import cn.iocoder.yudao.module.crm.service.contract.ContractService;
20 19 import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService;
... ... @@ -35,19 +34,19 @@ import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.*;
35 34 */
36 35 @Service
37 36 @Validated
38   -public class ReceivablePlanServiceImpl implements ReceivablePlanService {
  37 +public class CrmReceivablePlanServiceImpl implements CrmReceivablePlanService {
39 38  
40 39 @Resource
41   - private ReceivablePlanMapper receivablePlanMapper;
  40 + private CrmReceivablePlanMapper crmReceivablePlanMapper;
42 41 @Resource
43 42 private ContractService contractService;
44 43 @Resource
45 44 private CrmCustomerService crmCustomerService;
46 45  
47 46 @Override
48   - public Long createReceivablePlan(ReceivablePlanCreateReqVO createReqVO) {
  47 + public Long createReceivablePlan(CrmReceivablePlanCreateReqVO createReqVO) {
49 48 // 插入
50   - ReceivablePlanDO receivablePlan = ReceivablePlanConvert.INSTANCE.convert(createReqVO);
  49 + CrmReceivablePlanDO receivablePlan = CrmReceivablePlanConvert.INSTANCE.convert(createReqVO);
51 50 if (ObjectUtil.isNull(receivablePlan.getStatus())){
52 51 receivablePlan.setStatus(CommonStatusEnum.ENABLE.getStatus());
53 52 }
... ... @@ -57,12 +56,12 @@ public class ReceivablePlanServiceImpl implements ReceivablePlanService {
57 56  
58 57 checkReceivablePlan(receivablePlan);
59 58  
60   - receivablePlanMapper.insert(receivablePlan);
  59 + crmReceivablePlanMapper.insert(receivablePlan);
61 60 // 返回
62 61 return receivablePlan.getId();
63 62 }
64 63  
65   - private void checkReceivablePlan(ReceivablePlanDO receivablePlan) {
  64 + private void checkReceivablePlan(CrmReceivablePlanDO receivablePlan) {
66 65  
67 66 if(ObjectUtil.isNull(receivablePlan.getContractId())){
68 67 throw exception(CONTRACT_NOT_EXISTS);
... ... @@ -81,13 +80,13 @@ public class ReceivablePlanServiceImpl implements ReceivablePlanService {
81 80 }
82 81  
83 82 @Override
84   - public void updateReceivablePlan(ReceivablePlanUpdateReqVO updateReqVO) {
  83 + public void updateReceivablePlan(CrmReceivablePlanUpdateReqVO updateReqVO) {
85 84 // 校验存在
86 85 validateReceivablePlanExists(updateReqVO.getId());
87 86  
88 87 // 更新
89   - ReceivablePlanDO updateObj = ReceivablePlanConvert.INSTANCE.convert(updateReqVO);
90   - receivablePlanMapper.updateById(updateObj);
  88 + CrmReceivablePlanDO updateObj = CrmReceivablePlanConvert.INSTANCE.convert(updateReqVO);
  89 + crmReceivablePlanMapper.updateById(updateObj);
91 90 }
92 91  
93 92 @Override
... ... @@ -95,36 +94,36 @@ public class ReceivablePlanServiceImpl implements ReceivablePlanService {
95 94 // 校验存在
96 95 validateReceivablePlanExists(id);
97 96 // 删除
98   - receivablePlanMapper.deleteById(id);
  97 + crmReceivablePlanMapper.deleteById(id);
99 98 }
100 99  
101 100 private void validateReceivablePlanExists(Long id) {
102   - if (receivablePlanMapper.selectById(id) == null) {
  101 + if (crmReceivablePlanMapper.selectById(id) == null) {
103 102 throw exception(RECEIVABLE_PLAN_NOT_EXISTS);
104 103 }
105 104 }
106 105  
107 106 @Override
108   - public ReceivablePlanDO getReceivablePlan(Long id) {
109   - return receivablePlanMapper.selectById(id);
  107 + public CrmReceivablePlanDO getReceivablePlan(Long id) {
  108 + return crmReceivablePlanMapper.selectById(id);
110 109 }
111 110  
112 111 @Override
113   - public List<ReceivablePlanDO> getReceivablePlanList(Collection<Long> ids) {
  112 + public List<CrmReceivablePlanDO> getReceivablePlanList(Collection<Long> ids) {
114 113 if (CollUtil.isEmpty(ids)) {
115 114 return ListUtil.empty();
116 115 }
117   - return receivablePlanMapper.selectBatchIds(ids);
  116 + return crmReceivablePlanMapper.selectBatchIds(ids);
118 117 }
119 118  
120 119 @Override
121   - public PageResult<ReceivablePlanDO> getReceivablePlanPage(ReceivablePlanPageReqVO pageReqVO) {
122   - return receivablePlanMapper.selectPage(pageReqVO);
  120 + public PageResult<CrmReceivablePlanDO> getReceivablePlanPage(CrmReceivablePlanPageReqVO pageReqVO) {
  121 + return crmReceivablePlanMapper.selectPage(pageReqVO);
123 122 }
124 123  
125 124 @Override
126   - public List<ReceivablePlanDO> getReceivablePlanList(ReceivablePlanExportReqVO exportReqVO) {
127   - return receivablePlanMapper.selectList(exportReqVO);
  125 + public List<CrmReceivablePlanDO> getReceivablePlanList(CrmReceivablePlanExportReqVO exportReqVO) {
  126 + return crmReceivablePlanMapper.selectList(exportReqVO);
128 127 }
129 128  
130 129 }
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivableService.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableService.java
... ... @@ -4,7 +4,7 @@ import java.util.*;
4 4 import javax.validation.*;
5 5  
6 6 import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.*;
7   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivableDO;
  7 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivableDO;
8 8 import cn.iocoder.yudao.framework.common.pojo.PageResult;
9 9  
10 10 /**
... ... @@ -12,7 +12,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
12 12 *
13 13 * @author 赤焰
14 14 */
15   -public interface ReceivableService {
  15 +public interface CrmReceivableService {
16 16  
17 17 /**
18 18 * 创建回款管理
... ... @@ -20,14 +20,14 @@ public interface ReceivableService {
20 20 * @param createReqVO 创建信息
21 21 * @return 编号
22 22 */
23   - Long createReceivable(@Valid ReceivableCreateReqVO createReqVO);
  23 + Long createReceivable(@Valid CrmReceivableCreateReqVO createReqVO);
24 24  
25 25 /**
26 26 * 更新回款管理
27 27 *
28 28 * @param updateReqVO 更新信息
29 29 */
30   - void updateReceivable(@Valid ReceivableUpdateReqVO updateReqVO);
  30 + void updateReceivable(@Valid CrmReceivableUpdateReqVO updateReqVO);
31 31  
32 32 /**
33 33 * 删除回款管理
... ... @@ -42,7 +42,7 @@ public interface ReceivableService {
42 42 * @param id 编号
43 43 * @return 回款管理
44 44 */
45   - ReceivableDO getReceivable(Long id);
  45 + CrmReceivableDO getReceivable(Long id);
46 46  
47 47 /**
48 48 * 获得回款管理列表
... ... @@ -50,7 +50,7 @@ public interface ReceivableService {
50 50 * @param ids 编号
51 51 * @return 回款管理列表
52 52 */
53   - List<ReceivableDO> getReceivableList(Collection<Long> ids);
  53 + List<CrmReceivableDO> getReceivableList(Collection<Long> ids);
54 54  
55 55 /**
56 56 * 获得回款管理分页
... ... @@ -58,7 +58,7 @@ public interface ReceivableService {
58 58 * @param pageReqVO 分页查询
59 59 * @return 回款管理分页
60 60 */
61   - PageResult<ReceivableDO> getReceivablePage(ReceivablePageReqVO pageReqVO);
  61 + PageResult<CrmReceivableDO> getReceivablePage(CrmReceivablePageReqVO pageReqVO);
62 62  
63 63 /**
64 64 * 获得回款管理列表, 用于 Excel 导出
... ... @@ -66,6 +66,6 @@ public interface ReceivableService {
66 66 * @param exportReqVO 查询条件
67 67 * @return 回款管理列表
68 68 */
69   - List<ReceivableDO> getReceivableList(ReceivableExportReqVO exportReqVO);
  69 + List<CrmReceivableDO> getReceivableList(CrmReceivableExportReqVO exportReqVO);
70 70  
71 71 }
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivableServiceImpl.java renamed to yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivableServiceImpl.java
... ... @@ -3,19 +3,18 @@ package cn.iocoder.yudao.module.crm.service.receivable;
3 3 import cn.hutool.core.collection.CollUtil;
4 4 import cn.hutool.core.collection.ListUtil;
5 5 import cn.hutool.core.util.ObjectUtil;
6   -import cn.hutool.core.util.StrUtil;
7 6 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
8 7 import cn.iocoder.yudao.framework.common.pojo.PageResult;
9   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivableCreateReqVO;
10   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivableExportReqVO;
11   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivablePageReqVO;
12   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivableUpdateReqVO;
13   -import cn.iocoder.yudao.module.crm.convert.receivable.ReceivableConvert;
  8 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivableCreateReqVO;
  9 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivableExportReqVO;
  10 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivablePageReqVO;
  11 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivableUpdateReqVO;
  12 +import cn.iocoder.yudao.module.crm.convert.receivable.CrmReceivableConvert;
14 13 import cn.iocoder.yudao.module.crm.dal.dataobject.contract.ContractDO;
15 14 import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO;
16   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivableDO;
17   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivablePlanDO;
18   -import cn.iocoder.yudao.module.crm.dal.mysql.receivable.ReceivableMapper;
  15 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivableDO;
  16 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO;
  17 +import cn.iocoder.yudao.module.crm.dal.mysql.receivable.CrmReceivableMapper;
19 18 import cn.iocoder.yudao.module.crm.enums.AuditStatusEnum;
20 19 import cn.iocoder.yudao.module.crm.service.contract.ContractService;
21 20 import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService;
... ... @@ -36,21 +35,21 @@ import static cn.iocoder.yudao.module.crm.enums.ErrorCodeConstants.*;
36 35 */
37 36 @Service
38 37 @Validated
39   -public class ReceivableServiceImpl implements ReceivableService {
  38 +public class CrmReceivableServiceImpl implements CrmReceivableService {
40 39  
41 40 @Resource
42   - private ReceivableMapper receivableMapper;
  41 + private CrmReceivableMapper crmReceivableMapper;
43 42 @Resource
44 43 private ContractService contractService;
45 44 @Resource
46 45 private CrmCustomerService crmCustomerService;
47 46 @Resource
48   - private ReceivablePlanService receivablePlanService;
  47 + private CrmReceivablePlanService crmReceivablePlanService;
49 48  
50 49 @Override
51   - public Long createReceivable(ReceivableCreateReqVO createReqVO) {
  50 + public Long createReceivable(CrmReceivableCreateReqVO createReqVO) {
52 51 // 插入
53   - ReceivableDO receivable = ReceivableConvert.INSTANCE.convert(createReqVO);
  52 + CrmReceivableDO receivable = CrmReceivableConvert.INSTANCE.convert(createReqVO);
54 53 if (ObjectUtil.isNull(receivable.getStatus())){
55 54 receivable.setStatus(CommonStatusEnum.ENABLE.getStatus());
56 55 }
... ... @@ -61,12 +60,12 @@ public class ReceivableServiceImpl implements ReceivableService {
61 60 //校验
62 61 checkReceivable(receivable);
63 62  
64   - receivableMapper.insert(receivable);
  63 + crmReceivableMapper.insert(receivable);
65 64 // 返回
66 65 return receivable.getId();
67 66 }
68 67  
69   - private void checkReceivable(ReceivableDO receivable) {
  68 + private void checkReceivable(CrmReceivableDO receivable) {
70 69  
71 70 if(ObjectUtil.isNull(receivable.getContractId())){
72 71 throw exception(CONTRACT_NOT_EXISTS);
... ... @@ -82,7 +81,7 @@ public class ReceivableServiceImpl implements ReceivableService {
82 81 throw exception(CUSTOMER_NOT_EXISTS);
83 82 }
84 83  
85   - ReceivablePlanDO receivablePlan = receivablePlanService.getReceivablePlan(receivable.getPlanId());
  84 + CrmReceivablePlanDO receivablePlan = crmReceivablePlanService.getReceivablePlan(receivable.getPlanId());
86 85 if(ObjectUtil.isNull(receivablePlan)){
87 86 throw exception(RECEIVABLE_PLAN_NOT_EXISTS);
88 87 }
... ... @@ -90,13 +89,13 @@ public class ReceivableServiceImpl implements ReceivableService {
90 89 }
91 90  
92 91 @Override
93   - public void updateReceivable(ReceivableUpdateReqVO updateReqVO) {
  92 + public void updateReceivable(CrmReceivableUpdateReqVO updateReqVO) {
94 93 // 校验存在
95 94 validateReceivableExists(updateReqVO.getId());
96 95  
97 96 // 更新
98   - ReceivableDO updateObj = ReceivableConvert.INSTANCE.convert(updateReqVO);
99   - receivableMapper.updateById(updateObj);
  97 + CrmReceivableDO updateObj = CrmReceivableConvert.INSTANCE.convert(updateReqVO);
  98 + crmReceivableMapper.updateById(updateObj);
100 99 }
101 100  
102 101 @Override
... ... @@ -104,36 +103,36 @@ public class ReceivableServiceImpl implements ReceivableService {
104 103 // 校验存在
105 104 validateReceivableExists(id);
106 105 // 删除
107   - receivableMapper.deleteById(id);
  106 + crmReceivableMapper.deleteById(id);
108 107 }
109 108  
110 109 private void validateReceivableExists(Long id) {
111   - if (receivableMapper.selectById(id) == null) {
  110 + if (crmReceivableMapper.selectById(id) == null) {
112 111 throw exception(RECEIVABLE_NOT_EXISTS);
113 112 }
114 113 }
115 114  
116 115 @Override
117   - public ReceivableDO getReceivable(Long id) {
118   - return receivableMapper.selectById(id);
  116 + public CrmReceivableDO getReceivable(Long id) {
  117 + return crmReceivableMapper.selectById(id);
119 118 }
120 119  
121 120 @Override
122   - public List<ReceivableDO> getReceivableList(Collection<Long> ids) {
  121 + public List<CrmReceivableDO> getReceivableList(Collection<Long> ids) {
123 122 if (CollUtil.isEmpty(ids)) {
124 123 return ListUtil.empty();
125 124 }
126   - return receivableMapper.selectBatchIds(ids);
  125 + return crmReceivableMapper.selectBatchIds(ids);
127 126 }
128 127  
129 128 @Override
130   - public PageResult<ReceivableDO> getReceivablePage(ReceivablePageReqVO pageReqVO) {
131   - return receivableMapper.selectPage(pageReqVO);
  129 + public PageResult<CrmReceivableDO> getReceivablePage(CrmReceivablePageReqVO pageReqVO) {
  130 + return crmReceivableMapper.selectPage(pageReqVO);
132 131 }
133 132  
134 133 @Override
135   - public List<ReceivableDO> getReceivableList(ReceivableExportReqVO exportReqVO) {
136   - return receivableMapper.selectList(exportReqVO);
  134 + public List<CrmReceivableDO> getReceivableList(CrmReceivableExportReqVO exportReqVO) {
  135 + return crmReceivableMapper.selectList(exportReqVO);
137 136 }
138 137  
139 138 }
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/receivable/ReceivableMapper.xml renamed to yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/receivable/CrmReceivableMapper.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3   -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.receivable.ReceivableMapper">
  3 +<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.receivable.CrmReceivableMapper">
4 4  
5 5 <!--
6 6 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
... ...
yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/receivable/ReceivablePlanMapper.xml renamed to yudao-module-crm/yudao-module-crm-biz/src/main/resources/mapper/receivable/CrmReceivablePlanMapper.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3   -<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.receivable.ReceivablePlanMapper">
  3 +<mapper namespace="cn.iocoder.yudao.module.crm.dal.mysql.receivable.CrmReceivablePlanMapper">
4 4  
5 5 <!--
6 6 一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
... ...
yudao-module-crm/yudao-module-crm-biz/src/test/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivablePlanServiceImplTest.java renamed to yudao-module-crm/yudao-module-crm-biz/src/test/java/cn/iocoder/yudao/module/crm/service/receivable/CrmCrmReceivablePlanServiceImplTest.java
... ... @@ -2,12 +2,12 @@ package cn.iocoder.yudao.module.crm.service.receivable;
2 2  
3 3 import cn.iocoder.yudao.framework.common.pojo.PageResult;
4 4 import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest;
5   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivablePlanCreateReqVO;
6   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivablePlanExportReqVO;
7   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivablePlanPageReqVO;
8   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivablePlanUpdateReqVO;
9   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivablePlanDO;
10   -import cn.iocoder.yudao.module.crm.dal.mysql.receivable.ReceivablePlanMapper;
  5 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivablePlanCreateReqVO;
  6 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivablePlanExportReqVO;
  7 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivablePlanPageReqVO;
  8 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivablePlanUpdateReqVO;
  9 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivablePlanDO;
  10 +import cn.iocoder.yudao.module.crm.dal.mysql.receivable.CrmReceivablePlanMapper;
11 11 import org.junit.jupiter.api.Disabled;
12 12 import org.junit.jupiter.api.Test;
13 13 import org.springframework.context.annotation.Import;
... ... @@ -26,54 +26,54 @@ import static org.junit.jupiter.api.Assertions.*;
26 26  
27 27 // TODO 芋艿:后续,需要补充测试用例
28 28 /**
29   - * {@link ReceivablePlanServiceImpl} 的单元测试类
  29 + * {@link CrmReceivablePlanServiceImpl} 的单元测试类
30 30 *
31 31 * @author 芋道源码
32 32 */
33   -@Import(ReceivablePlanServiceImpl.class)
34   -public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
  33 +@Import(CrmReceivablePlanServiceImpl.class)
  34 +public class CrmCrmReceivablePlanServiceImplTest extends BaseDbUnitTest {
35 35  
36 36 @Resource
37   - private ReceivablePlanServiceImpl receivablePlanService;
  37 + private CrmReceivablePlanServiceImpl receivablePlanService;
38 38  
39 39 @Resource
40   - private ReceivablePlanMapper receivablePlanMapper;
  40 + private CrmReceivablePlanMapper crmReceivablePlanMapper;
41 41  
42 42 @Test
43 43 public void testCreateReceivablePlan_success() {
44 44 // 准备参数
45   - ReceivablePlanCreateReqVO reqVO = randomPojo(ReceivablePlanCreateReqVO.class);
  45 + CrmReceivablePlanCreateReqVO reqVO = randomPojo(CrmReceivablePlanCreateReqVO.class);
46 46  
47 47 // 调用
48 48 Long receivablePlanId = receivablePlanService.createReceivablePlan(reqVO);
49 49 // 断言
50 50 assertNotNull(receivablePlanId);
51 51 // 校验记录的属性是否正确
52   - ReceivablePlanDO receivablePlan = receivablePlanMapper.selectById(receivablePlanId);
  52 + CrmReceivablePlanDO receivablePlan = crmReceivablePlanMapper.selectById(receivablePlanId);
53 53 assertPojoEquals(reqVO, receivablePlan);
54 54 }
55 55  
56 56 @Test
57 57 public void testUpdateReceivablePlan_success() {
58 58 // mock 数据
59   - ReceivablePlanDO dbReceivablePlan = randomPojo(ReceivablePlanDO.class);
60   - receivablePlanMapper.insert(dbReceivablePlan);// @Sql: 先插入出一条存在的数据
  59 + CrmReceivablePlanDO dbReceivablePlan = randomPojo(CrmReceivablePlanDO.class);
  60 + crmReceivablePlanMapper.insert(dbReceivablePlan);// @Sql: 先插入出一条存在的数据
61 61 // 准备参数
62   - ReceivablePlanUpdateReqVO reqVO = randomPojo(ReceivablePlanUpdateReqVO.class, o -> {
  62 + CrmReceivablePlanUpdateReqVO reqVO = randomPojo(CrmReceivablePlanUpdateReqVO.class, o -> {
63 63 o.setId(dbReceivablePlan.getId()); // 设置更新的 ID
64 64 });
65 65  
66 66 // 调用
67 67 receivablePlanService.updateReceivablePlan(reqVO);
68 68 // 校验是否更新正确
69   - ReceivablePlanDO receivablePlan = receivablePlanMapper.selectById(reqVO.getId()); // 获取最新的
  69 + CrmReceivablePlanDO receivablePlan = crmReceivablePlanMapper.selectById(reqVO.getId()); // 获取最新的
70 70 assertPojoEquals(reqVO, receivablePlan);
71 71 }
72 72  
73 73 @Test
74 74 public void testUpdateReceivablePlan_notExists() {
75 75 // 准备参数
76   - ReceivablePlanUpdateReqVO reqVO = randomPojo(ReceivablePlanUpdateReqVO.class);
  76 + CrmReceivablePlanUpdateReqVO reqVO = randomPojo(CrmReceivablePlanUpdateReqVO.class);
77 77  
78 78 // 调用, 并断言异常
79 79 assertServiceException(() -> receivablePlanService.updateReceivablePlan(reqVO), RECEIVABLE_PLAN_NOT_EXISTS);
... ... @@ -82,15 +82,15 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
82 82 @Test
83 83 public void testDeleteReceivablePlan_success() {
84 84 // mock 数据
85   - ReceivablePlanDO dbReceivablePlan = randomPojo(ReceivablePlanDO.class);
86   - receivablePlanMapper.insert(dbReceivablePlan);// @Sql: 先插入出一条存在的数据
  85 + CrmReceivablePlanDO dbReceivablePlan = randomPojo(CrmReceivablePlanDO.class);
  86 + crmReceivablePlanMapper.insert(dbReceivablePlan);// @Sql: 先插入出一条存在的数据
87 87 // 准备参数
88 88 Long id = dbReceivablePlan.getId();
89 89  
90 90 // 调用
91 91 receivablePlanService.deleteReceivablePlan(id);
92 92 // 校验数据不存在了
93   - assertNull(receivablePlanMapper.selectById(id));
  93 + assertNull(crmReceivablePlanMapper.selectById(id));
94 94 }
95 95  
96 96 @Test
... ... @@ -106,7 +106,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
106 106 @Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
107 107 public void testGetReceivablePlanPage() {
108 108 // mock 数据
109   - ReceivablePlanDO dbReceivablePlan = randomPojo(ReceivablePlanDO.class, o -> { // 等会查询到
  109 + CrmReceivablePlanDO dbReceivablePlan = randomPojo(CrmReceivablePlanDO.class, o -> { // 等会查询到
110 110 o.setPeriod(null);
111 111 o.setStatus(null);
112 112 o.setCheckStatus(null);
... ... @@ -119,31 +119,31 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
119 119 o.setRemark(null);
120 120 o.setCreateTime(null);
121 121 });
122   - receivablePlanMapper.insert(dbReceivablePlan);
  122 + crmReceivablePlanMapper.insert(dbReceivablePlan);
123 123 // 测试 Period 不匹配
124   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setPeriod(null)));
  124 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setPeriod(null)));
125 125 // 测试 status 不匹配
126   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setStatus(null)));
  126 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setStatus(null)));
127 127 // 测试 checkStatus 不匹配
128   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCheckStatus(null)));
  128 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCheckStatus(null)));
129 129 // 测试 returnTime 不匹配
130   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setReturnTime(null)));
  130 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setReturnTime(null)));
131 131 // 测试 remindDays 不匹配
132   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setRemindDays(null)));
  132 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setRemindDays(null)));
133 133 // 测试 remindTime 不匹配
134   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setRemindTime(null)));
  134 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setRemindTime(null)));
135 135 // 测试 customerId 不匹配
136   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCustomerId(null)));
  136 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCustomerId(null)));
137 137 // 测试 contractId 不匹配
138   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setContractId(null)));
  138 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setContractId(null)));
139 139 // 测试 ownerUserId 不匹配
140   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setOwnerUserId(null)));
  140 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setOwnerUserId(null)));
141 141 // 测试 remark 不匹配
142   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setRemark(null)));
  142 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setRemark(null)));
143 143 // 测试 createTime 不匹配
144   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCreateTime(null)));
  144 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCreateTime(null)));
145 145 // 准备参数
146   - ReceivablePlanPageReqVO reqVO = new ReceivablePlanPageReqVO();
  146 + CrmReceivablePlanPageReqVO reqVO = new CrmReceivablePlanPageReqVO();
147 147 reqVO.setStatus(null);
148 148 reqVO.setCheckStatus(null);
149 149 reqVO.setReturnTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
... ... @@ -154,7 +154,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
154 154 reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
155 155  
156 156 // 调用
157   - PageResult<ReceivablePlanDO> pageResult = receivablePlanService.getReceivablePlanPage(reqVO);
  157 + PageResult<CrmReceivablePlanDO> pageResult = receivablePlanService.getReceivablePlanPage(reqVO);
158 158 // 断言
159 159 assertEquals(1, pageResult.getTotal());
160 160 assertEquals(1, pageResult.getList().size());
... ... @@ -165,7 +165,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
165 165 @Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
166 166 public void testGetReceivablePlanList() {
167 167 // mock 数据
168   - ReceivablePlanDO dbReceivablePlan = randomPojo(ReceivablePlanDO.class, o -> { // 等会查询到
  168 + CrmReceivablePlanDO dbReceivablePlan = randomPojo(CrmReceivablePlanDO.class, o -> { // 等会查询到
169 169 o.setPeriod(null);
170 170 o.setStatus(null);
171 171 o.setCheckStatus(null);
... ... @@ -178,31 +178,31 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
178 178 o.setRemark(null);
179 179 o.setCreateTime(null);
180 180 });
181   - receivablePlanMapper.insert(dbReceivablePlan);
  181 + crmReceivablePlanMapper.insert(dbReceivablePlan);
182 182 // 测试 Period 不匹配
183   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setPeriod(null)));
  183 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setPeriod(null)));
184 184 // 测试 status 不匹配
185   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setStatus(null)));
  185 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setStatus(null)));
186 186 // 测试 checkStatus 不匹配
187   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCheckStatus(null)));
  187 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCheckStatus(null)));
188 188 // 测试 returnTime 不匹配
189   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setReturnTime(null)));
  189 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setReturnTime(null)));
190 190 // 测试 remindDays 不匹配
191   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setRemindDays(null)));
  191 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setRemindDays(null)));
192 192 // 测试 remindTime 不匹配
193   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setRemindTime(null)));
  193 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setRemindTime(null)));
194 194 // 测试 customerId 不匹配
195   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCustomerId(null)));
  195 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCustomerId(null)));
196 196 // 测试 contractId 不匹配
197   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setContractId(null)));
  197 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setContractId(null)));
198 198 // 测试 ownerUserId 不匹配
199   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setOwnerUserId(null)));
  199 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setOwnerUserId(null)));
200 200 // 测试 remark 不匹配
201   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setRemark(null)));
  201 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setRemark(null)));
202 202 // 测试 createTime 不匹配
203   - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCreateTime(null)));
  203 + crmReceivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCreateTime(null)));
204 204 // 准备参数
205   - ReceivablePlanExportReqVO reqVO = new ReceivablePlanExportReqVO();
  205 + CrmReceivablePlanExportReqVO reqVO = new CrmReceivablePlanExportReqVO();
206 206 reqVO.setPeriod(null);
207 207 reqVO.setStatus(null);
208 208 reqVO.setCheckStatus(null);
... ... @@ -216,7 +216,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest {
216 216 reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
217 217  
218 218 // 调用
219   - List<ReceivablePlanDO> list = receivablePlanService.getReceivablePlanList(reqVO);
  219 + List<CrmReceivablePlanDO> list = receivablePlanService.getReceivablePlanList(reqVO);
220 220 // 断言
221 221 assertEquals(1, list.size());
222 222 assertPojoEquals(dbReceivablePlan, list.get(0));
... ...
yudao-module-crm/yudao-module-crm-biz/src/test/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivableServiceImplTest.java renamed to yudao-module-crm/yudao-module-crm-biz/src/test/java/cn/iocoder/yudao/module/crm/service/receivable/CrmCrmReceivableServiceImplTest.java
... ... @@ -2,12 +2,12 @@ package cn.iocoder.yudao.module.crm.service.receivable;
2 2  
3 3 import cn.iocoder.yudao.framework.common.pojo.PageResult;
4 4 import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest;
5   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivableCreateReqVO;
6   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivableExportReqVO;
7   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivablePageReqVO;
8   -import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.ReceivableUpdateReqVO;
9   -import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.ReceivableDO;
10   -import cn.iocoder.yudao.module.crm.dal.mysql.receivable.ReceivableMapper;
  5 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivableCreateReqVO;
  6 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivableExportReqVO;
  7 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivablePageReqVO;
  8 +import cn.iocoder.yudao.module.crm.controller.admin.receivable.vo.CrmReceivableUpdateReqVO;
  9 +import cn.iocoder.yudao.module.crm.dal.dataobject.receivable.CrmReceivableDO;
  10 +import cn.iocoder.yudao.module.crm.dal.mysql.receivable.CrmReceivableMapper;
11 11 import org.junit.jupiter.api.Disabled;
12 12 import org.junit.jupiter.api.Test;
13 13 import org.springframework.context.annotation.Import;
... ... @@ -26,54 +26,54 @@ import static org.junit.jupiter.api.Assertions.*;
26 26  
27 27 // TODO 芋艿:等实现完,在校验下;
28 28 /**
29   - * {@link ReceivableServiceImpl} 的单元测试类
  29 + * {@link CrmReceivableServiceImpl} 的单元测试类
30 30 *
31 31 * @author 赤焰
32 32 */
33   -@Import(ReceivableServiceImpl.class)
34   -public class ReceivableServiceImplTest extends BaseDbUnitTest {
  33 +@Import(CrmReceivableServiceImpl.class)
  34 +public class CrmCrmReceivableServiceImplTest extends BaseDbUnitTest {
35 35  
36 36 @Resource
37   - private ReceivableServiceImpl receivableService;
  37 + private CrmReceivableServiceImpl receivableService;
38 38  
39 39 @Resource
40   - private ReceivableMapper receivableMapper;
  40 + private CrmReceivableMapper crmReceivableMapper;
41 41  
42 42 @Test
43 43 public void testCreateReceivable_success() {
44 44 // 准备参数
45   - ReceivableCreateReqVO reqVO = randomPojo(ReceivableCreateReqVO.class);
  45 + CrmReceivableCreateReqVO reqVO = randomPojo(CrmReceivableCreateReqVO.class);
46 46  
47 47 // 调用
48 48 Long receivableId = receivableService.createReceivable(reqVO);
49 49 // 断言
50 50 assertNotNull(receivableId);
51 51 // 校验记录的属性是否正确
52   - ReceivableDO receivable = receivableMapper.selectById(receivableId);
  52 + CrmReceivableDO receivable = crmReceivableMapper.selectById(receivableId);
53 53 assertPojoEquals(reqVO, receivable);
54 54 }
55 55  
56 56 @Test
57 57 public void testUpdateReceivable_success() {
58 58 // mock 数据
59   - ReceivableDO dbReceivable = randomPojo(ReceivableDO.class);
60   - receivableMapper.insert(dbReceivable);// @Sql: 先插入出一条存在的数据
  59 + CrmReceivableDO dbReceivable = randomPojo(CrmReceivableDO.class);
  60 + crmReceivableMapper.insert(dbReceivable);// @Sql: 先插入出一条存在的数据
61 61 // 准备参数
62   - ReceivableUpdateReqVO reqVO = randomPojo(ReceivableUpdateReqVO.class, o -> {
  62 + CrmReceivableUpdateReqVO reqVO = randomPojo(CrmReceivableUpdateReqVO.class, o -> {
63 63 o.setId(dbReceivable.getId()); // 设置更新的 ID
64 64 });
65 65  
66 66 // 调用
67 67 receivableService.updateReceivable(reqVO);
68 68 // 校验是否更新正确
69   - ReceivableDO receivable = receivableMapper.selectById(reqVO.getId()); // 获取最新的
  69 + CrmReceivableDO receivable = crmReceivableMapper.selectById(reqVO.getId()); // 获取最新的
70 70 assertPojoEquals(reqVO, receivable);
71 71 }
72 72  
73 73 @Test
74 74 public void testUpdateReceivable_notExists() {
75 75 // 准备参数
76   - ReceivableUpdateReqVO reqVO = randomPojo(ReceivableUpdateReqVO.class);
  76 + CrmReceivableUpdateReqVO reqVO = randomPojo(CrmReceivableUpdateReqVO.class);
77 77  
78 78 // 调用, 并断言异常
79 79 assertServiceException(() -> receivableService.updateReceivable(reqVO), RECEIVABLE_NOT_EXISTS);
... ... @@ -82,15 +82,15 @@ public class ReceivableServiceImplTest extends BaseDbUnitTest {
82 82 @Test
83 83 public void testDeleteReceivable_success() {
84 84 // mock 数据
85   - ReceivableDO dbReceivable = randomPojo(ReceivableDO.class);
86   - receivableMapper.insert(dbReceivable);// @Sql: 先插入出一条存在的数据
  85 + CrmReceivableDO dbReceivable = randomPojo(CrmReceivableDO.class);
  86 + crmReceivableMapper.insert(dbReceivable);// @Sql: 先插入出一条存在的数据
87 87 // 准备参数
88 88 Long id = dbReceivable.getId();
89 89  
90 90 // 调用
91 91 receivableService.deleteReceivable(id);
92 92 // 校验数据不存在了
93   - assertNull(receivableMapper.selectById(id));
  93 + assertNull(crmReceivableMapper.selectById(id));
94 94 }
95 95  
96 96 @Test
... ... @@ -106,7 +106,7 @@ public class ReceivableServiceImplTest extends BaseDbUnitTest {
106 106 @Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
107 107 public void testGetReceivablePage() {
108 108 // mock 数据
109   - ReceivableDO dbReceivable = randomPojo(ReceivableDO.class, o -> { // 等会查询到
  109 + CrmReceivableDO dbReceivable = randomPojo(CrmReceivableDO.class, o -> { // 等会查询到
110 110 o.setNo(null);
111 111 o.setPlanId(null);
112 112 o.setCustomerId(null);
... ... @@ -125,43 +125,43 @@ public class ReceivableServiceImplTest extends BaseDbUnitTest {
125 125 o.setRemark(null);
126 126 o.setCreateTime(null);
127 127 });
128   - receivableMapper.insert(dbReceivable);
  128 + crmReceivableMapper.insert(dbReceivable);
129 129 // 测试 no 不匹配
130   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setNo(null)));
  130 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setNo(null)));
131 131 // 测试 planId 不匹配
132   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setPlanId(null)));
  132 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setPlanId(null)));
133 133 // 测试 customerId 不匹配
134   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setCustomerId(null)));
  134 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setCustomerId(null)));
135 135 // 测试 contractId 不匹配
136   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setContractId(null)));
  136 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setContractId(null)));
137 137 // 测试 checkStatus 不匹配
138   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setCheckStatus(null)));
  138 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setCheckStatus(null)));
139 139 // 测试 processInstanceId 不匹配
140   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setProcessInstanceId(null)));
  140 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setProcessInstanceId(null)));
141 141 // 测试 returnTime 不匹配
142   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setReturnTime(null)));
  142 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setReturnTime(null)));
143 143 // 测试 returnType 不匹配
144   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setReturnType(null)));
  144 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setReturnType(null)));
145 145 // 测试 price 不匹配
146   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setPrice(null)));
  146 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setPrice(null)));
147 147 // 测试 ownerUserId 不匹配
148   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setOwnerUserId(null)));
  148 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setOwnerUserId(null)));
149 149 // 测试 batchId 不匹配
150   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setBatchId(null)));
  150 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setBatchId(null)));
151 151 // 测试 sort 不匹配
152   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setSort(null)));
  152 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setSort(null)));
153 153 // 测试 dataScope 不匹配
154   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setDataScope(null)));
  154 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setDataScope(null)));
155 155 // 测试 dataScopeDeptIds 不匹配
156   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setDataScopeDeptIds(null)));
  156 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setDataScopeDeptIds(null)));
157 157 // 测试 status 不匹配
158   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setStatus(null)));
  158 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setStatus(null)));
159 159 // 测试 remark 不匹配
160   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setRemark(null)));
  160 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setRemark(null)));
161 161 // 测试 createTime 不匹配
162   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setCreateTime(null)));
  162 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setCreateTime(null)));
163 163 // 准备参数
164   - ReceivablePageReqVO reqVO = new ReceivablePageReqVO();
  164 + CrmReceivablePageReqVO reqVO = new CrmReceivablePageReqVO();
165 165 reqVO.setNo(null);
166 166 reqVO.setPlanId(null);
167 167 reqVO.setCustomerId(null);
... ... @@ -175,7 +175,7 @@ public class ReceivableServiceImplTest extends BaseDbUnitTest {
175 175 reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
176 176  
177 177 // 调用
178   - PageResult<ReceivableDO> pageResult = receivableService.getReceivablePage(reqVO);
  178 + PageResult<CrmReceivableDO> pageResult = receivableService.getReceivablePage(reqVO);
179 179 // 断言
180 180 assertEquals(1, pageResult.getTotal());
181 181 assertEquals(1, pageResult.getList().size());
... ... @@ -186,7 +186,7 @@ public class ReceivableServiceImplTest extends BaseDbUnitTest {
186 186 @Disabled // TODO 请修改 null 为需要的值,然后删除 @Disabled 注解
187 187 public void testGetReceivableList() {
188 188 // mock 数据
189   - ReceivableDO dbReceivable = randomPojo(ReceivableDO.class, o -> { // 等会查询到
  189 + CrmReceivableDO dbReceivable = randomPojo(CrmReceivableDO.class, o -> { // 等会查询到
190 190 o.setNo(null);
191 191 o.setPlanId(null);
192 192 o.setCustomerId(null);
... ... @@ -205,43 +205,43 @@ public class ReceivableServiceImplTest extends BaseDbUnitTest {
205 205 o.setRemark(null);
206 206 o.setCreateTime(null);
207 207 });
208   - receivableMapper.insert(dbReceivable);
  208 + crmReceivableMapper.insert(dbReceivable);
209 209 // 测试 no 不匹配
210   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setNo(null)));
  210 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setNo(null)));
211 211 // 测试 planId 不匹配
212   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setPlanId(null)));
  212 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setPlanId(null)));
213 213 // 测试 customerId 不匹配
214   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setCustomerId(null)));
  214 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setCustomerId(null)));
215 215 // 测试 contractId 不匹配
216   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setContractId(null)));
  216 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setContractId(null)));
217 217 // 测试 checkStatus 不匹配
218   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setCheckStatus(null)));
  218 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setCheckStatus(null)));
219 219 // 测试 processInstanceId 不匹配
220   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setProcessInstanceId(null)));
  220 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setProcessInstanceId(null)));
221 221 // 测试 returnTime 不匹配
222   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setReturnTime(null)));
  222 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setReturnTime(null)));
223 223 // 测试 returnType 不匹配
224   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setReturnType(null)));
  224 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setReturnType(null)));
225 225 // 测试 price 不匹配
226   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setPrice(null)));
  226 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setPrice(null)));
227 227 // 测试 ownerUserId 不匹配
228   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setOwnerUserId(null)));
  228 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setOwnerUserId(null)));
229 229 // 测试 batchId 不匹配
230   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setBatchId(null)));
  230 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setBatchId(null)));
231 231 // 测试 sort 不匹配
232   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setSort(null)));
  232 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setSort(null)));
233 233 // 测试 dataScope 不匹配
234   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setDataScope(null)));
  234 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setDataScope(null)));
235 235 // 测试 dataScopeDeptIds 不匹配
236   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setDataScopeDeptIds(null)));
  236 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setDataScopeDeptIds(null)));
237 237 // 测试 status 不匹配
238   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setStatus(null)));
  238 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setStatus(null)));
239 239 // 测试 remark 不匹配
240   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setRemark(null)));
  240 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setRemark(null)));
241 241 // 测试 createTime 不匹配
242   - receivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setCreateTime(null)));
  242 + crmReceivableMapper.insert(cloneIgnoreId(dbReceivable, o -> o.setCreateTime(null)));
243 243 // 准备参数
244   - ReceivableExportReqVO reqVO = new ReceivableExportReqVO();
  244 + CrmReceivableExportReqVO reqVO = new CrmReceivableExportReqVO();
245 245 reqVO.setNo(null);
246 246 reqVO.setPlanId(null);
247 247 reqVO.setCustomerId(null);
... ... @@ -257,7 +257,7 @@ public class ReceivableServiceImplTest extends BaseDbUnitTest {
257 257 reqVO.setCreateTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));
258 258  
259 259 // 调用
260   - List<ReceivableDO> list = receivableService.getReceivableList(reqVO);
  260 + List<CrmReceivableDO> list = receivableService.getReceivableList(reqVO);
261 261 // 断言
262 262 assertEquals(1, list.size());
263 263 assertPojoEquals(dbReceivable, list.get(0));
... ...