From b133acd8cdd741ded5bce27225ba12fefc3f2da2 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 17 Oct 2023 22:52:14 +0800 Subject: [PATCH] =?UTF-8?q?code=20review=EF=BC=9Acrm=20=E5=90=88=E5=90=8C?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/contract/ContractController.java | 10 ---------- .../controller/admin/contract/vo/ContractBaseVO.java | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/ContractController.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/ContractController.java index 3bc52c038..fd8b14afd 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/ContractController.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/ContractController.java @@ -19,7 +19,6 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.io.IOException; -import java.util.Collection; import java.util.List; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; @@ -67,15 +66,6 @@ public class ContractController { return success(ContractConvert.INSTANCE.convert(contract)); } - @GetMapping("/list") - @Operation(summary = "获得合同列表") - @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") - @PreAuthorize("@ss.hasPermission('crm:contract:query')") - public CommonResult> getContractList(@RequestParam("ids") Collection ids) { - List list = contractService.getContractList(ids); - return success(ContractConvert.INSTANCE.convertList(list)); - } - @GetMapping("/page") @Operation(summary = "获得合同分页") @PreAuthorize("@ss.hasPermission('crm:contract:query')") diff --git a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/ContractBaseVO.java b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/ContractBaseVO.java index ad43604a1..756ee0d1f 100644 --- a/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/ContractBaseVO.java +++ b/yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/contract/vo/ContractBaseVO.java @@ -9,6 +9,7 @@ import java.time.LocalDateTime; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; +// TODO @dhb52:所有类,带下 Crm 前缀,避免和别的模块重复 /** * 合同 Base VO,提供给添加、修改、详细的子 VO 使用 * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 @@ -16,10 +17,13 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class ContractBaseVO { + // TODO @dhb52:类似 no 字段的 example 要写xia 哈; + @Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") @NotNull(message = "合同名称不能为空") private String name; + // TODO @dhb52:这个必须传递 @Schema(description = "客户编号", example = "18336") private Long customerId; @@ -29,13 +33,17 @@ public class ContractBaseVO { @Schema(description = "工作流编号", example = "1043") private Long processInstanceId; + // TODO @dhb52:这个必须传递 @Schema(description = "下单日期") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime orderDate; + // TODO @dhb52:这个必须传递 @Schema(description = "负责人的用户编号", example = "17144") private Long ownerUserId; + // TODO @芋艿:未来应该支持自动生成; + // TODO @dhb52:这个必须传递; @Schema(description = "合同编号") private String no; @@ -69,4 +77,6 @@ public class ContractBaseVO { @Schema(description = "备注", example = "你猜") private String remark; + // TODO @dhb52:增加一个 status 字段:具体有哪些值,你来枚举下;主要页面上有个【草稿】【提交审核】的流程,可以看看。然后要对接工作流,这块也可以看看,不确定的地方问我。 + }