diff --git a/sql/mysql/crm.sql b/sql/mysql/crm.sql index de7922d24..8c662c238 100644 --- a/sql/mysql/crm.sql +++ b/sql/mysql/crm.sql @@ -41,7 +41,7 @@ CREATE TABLE `crm_receivable` ( DROP TABLE IF EXISTS `crm_receivable_plan`; CREATE TABLE `crm_receivable_plan` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `index_no` bigint(20) NULL DEFAULT NULL COMMENT '期数', + `period` tinyint(4) DEFAULT NULL COMMENT '期数', `receivable_id` bigint(20) NULL DEFAULT NULL COMMENT '回款ID', `status` tinyint(4) NOT NULL COMMENT '完成状态', `check_status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '审批状态', diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanBaseVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanBaseVO.java index 53572e2c4..b5ba20296 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanBaseVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanBaseVO.java @@ -18,7 +18,7 @@ public class ReceivablePlanBaseVO { // TODO 芋艿:这个字段,在想想命名; @Schema(description = "期数") - private Long indexNo; + private Integer period; // TODO @liuhongfeng:中英文之间,有个空格,这样更干净; @Schema(description = "回款ID", example = "19852") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExcelVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExcelVO.java index d08cfc6a7..0a3b2b7f8 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExcelVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExcelVO.java @@ -1,13 +1,9 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo; -import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import java.util.*; + import java.math.BigDecimal; import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; import com.alibaba.excel.annotation.ExcelProperty; import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; @@ -26,7 +22,7 @@ public class ReceivablePlanExcelVO { private Long id; @ExcelProperty("期数") - private Long indexNo; + private Integer period; @ExcelProperty("回款ID") private Long receivableId; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExportReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExportReqVO.java index e68427d29..a9b505fe2 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExportReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanExportReqVO.java @@ -1,9 +1,8 @@ package cn.iocoder.yudao.module.crm.controller.admin.receivable.vo; import lombok.*; -import java.util.*; import io.swagger.v3.oas.annotations.media.Schema; -import cn.iocoder.yudao.framework.common.pojo.PageParam; + import java.time.LocalDateTime; import org.springframework.format.annotation.DateTimeFormat; @@ -14,7 +13,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ public class ReceivablePlanExportReqVO { @Schema(description = "期数") - private Long indexNo; + private Integer period; @Schema(description = "完成状态", example = "2") private Integer status; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanPageReqVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanPageReqVO.java index acd4d5aa4..37c0446c3 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanPageReqVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/receivable/vo/ReceivablePlanPageReqVO.java @@ -20,7 +20,7 @@ public class ReceivablePlanPageReqVO extends PageParam { // TODO 芋艿:筛选字段,需要去掉几个,在想想; @Schema(description = "期数") - private Long indexNo; + private Integer period; @Schema(description = "完成状态", example = "2") private Integer status; diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/receivable/ReceivablePlanDO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/receivable/ReceivablePlanDO.java index 0c6f6e033..56ef67962 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/receivable/ReceivablePlanDO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/dataobject/receivable/ReceivablePlanDO.java @@ -1,12 +1,10 @@ package cn.iocoder.yudao.module.crm.dal.dataobject.receivable; import lombok.*; -import java.util.*; + import java.math.BigDecimal; import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; -import java.time.LocalDateTime; + import com.baomidou.mybatisplus.annotation.*; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; @@ -33,7 +31,7 @@ public class ReceivablePlanDO extends BaseDO { /** * 期数 */ - private Long indexNo; + private Integer period; /** * 回款ID */ diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/ReceivablePlanMapper.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/ReceivablePlanMapper.java index ac35133a7..3251c6787 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/ReceivablePlanMapper.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/dal/mysql/receivable/ReceivablePlanMapper.java @@ -19,7 +19,7 @@ public interface ReceivablePlanMapper extends BaseMapperX { default PageResult selectPage(ReceivablePlanPageReqVO reqVO) { return selectPage(reqVO, new LambdaQueryWrapperX() - .eqIfPresent(ReceivablePlanDO::getIndexNo, reqVO.getIndexNo()) + .eqIfPresent(ReceivablePlanDO::getPeriod, reqVO.getPeriod()) .eqIfPresent(ReceivablePlanDO::getStatus, reqVO.getStatus()) .eqIfPresent(ReceivablePlanDO::getCheckStatus, reqVO.getCheckStatus()) .betweenIfPresent(ReceivablePlanDO::getReturnTime, reqVO.getReturnTime()) @@ -35,7 +35,7 @@ public interface ReceivablePlanMapper extends BaseMapperX { default List selectList(ReceivablePlanExportReqVO reqVO) { return selectList(new LambdaQueryWrapperX() - .eqIfPresent(ReceivablePlanDO::getIndexNo, reqVO.getIndexNo()) + .eqIfPresent(ReceivablePlanDO::getPeriod, reqVO.getPeriod()) .eqIfPresent(ReceivablePlanDO::getStatus, reqVO.getStatus()) .eqIfPresent(ReceivablePlanDO::getCheckStatus, reqVO.getCheckStatus()) .betweenIfPresent(ReceivablePlanDO::getReturnTime, reqVO.getReturnTime()) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/test/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivablePlanServiceImplTest.java b/yudao-module-crm/yudao-module-crm-biz/src/test/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivablePlanServiceImplTest.java index 3739481c0..4f9fb8d26 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/test/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivablePlanServiceImplTest.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/test/java/cn/iocoder/yudao/module/crm/service/receivable/ReceivablePlanServiceImplTest.java @@ -107,7 +107,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest { public void testGetReceivablePlanPage() { // mock 数据 ReceivablePlanDO dbReceivablePlan = randomPojo(ReceivablePlanDO.class, o -> { // 等会查询到 - o.setIndexNo(null); + o.setPeriod(null); o.setStatus(null); o.setCheckStatus(null); o.setReturnTime(null); @@ -120,8 +120,8 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest { o.setCreateTime(null); }); receivablePlanMapper.insert(dbReceivablePlan); - // 测试 indexNo 不匹配 - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setIndexNo(null))); + // 测试 Period 不匹配 + receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setPeriod(null))); // 测试 status 不匹配 receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setStatus(null))); // 测试 checkStatus 不匹配 @@ -144,7 +144,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest { receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCreateTime(null))); // 准备参数 ReceivablePlanPageReqVO reqVO = new ReceivablePlanPageReqVO(); - reqVO.setIndexNo(null); + reqVO.setPeriod(null); reqVO.setStatus(null); reqVO.setCheckStatus(null); reqVO.setReturnTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28)); @@ -169,7 +169,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest { public void testGetReceivablePlanList() { // mock 数据 ReceivablePlanDO dbReceivablePlan = randomPojo(ReceivablePlanDO.class, o -> { // 等会查询到 - o.setIndexNo(null); + o.setPeriod(null); o.setStatus(null); o.setCheckStatus(null); o.setReturnTime(null); @@ -182,8 +182,8 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest { o.setCreateTime(null); }); receivablePlanMapper.insert(dbReceivablePlan); - // 测试 indexNo 不匹配 - receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setIndexNo(null))); + // 测试 Period 不匹配 + receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setPeriod(null))); // 测试 status 不匹配 receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setStatus(null))); // 测试 checkStatus 不匹配 @@ -206,7 +206,7 @@ public class ReceivablePlanServiceImplTest extends BaseDbUnitTest { receivablePlanMapper.insert(cloneIgnoreId(dbReceivablePlan, o -> o.setCreateTime(null))); // 准备参数 ReceivablePlanExportReqVO reqVO = new ReceivablePlanExportReqVO(); - reqVO.setIndexNo(null); + reqVO.setPeriod(null); reqVO.setStatus(null); reqVO.setCheckStatus(null); reqVO.setReturnTime(buildBetweenTime(2023, 2, 1, 2023, 2, 28));