From 159c10703727ce252e8a76373d31cfd7946f060a Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 1 Sep 2020 11:17:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E9=9B=86=E5=8A=9F=E8=83=BD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=BB=98=E8=AE=A412=E4=B8=AA=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E6=95=B0=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CustomerFunctionCollectResultDTO.java | 25 +++++++++++++++++++ .../CustomerFunctionDetailController.java | 3 +-- .../epmet/dao/CustomerFunctionDetailDao.java | 10 ++++++++ .../CustomerFunctionDetailService.java | 2 +- .../CustomerFunctionDetailServiceImpl.java | 15 +++++++---- .../mapper/CustomerFunctionDetailDao.xml | 24 ++++++++++++++++++ 6 files changed, 71 insertions(+), 8 deletions(-) create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFunctionCollectResultDTO.java diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFunctionCollectResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFunctionCollectResultDTO.java new file mode 100644 index 0000000000..b1d9b1afe0 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/CustomerFunctionCollectResultDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 运营端-定制功能采集-接口返参 + * @Author sun + */ +@Data +public class CustomerFunctionCollectResultDTO implements Serializable { + private static final long serialVersionUID = 2971689193155710437L; + + /** + * 客户某一端定制功能总数 + */ + private Integer num; + + /** + * 所属端中文名称 + */ + private String fromAppName; + +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java index 42f69d00e2..245d5018a2 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java @@ -188,8 +188,7 @@ public class CustomerFunctionDetailController { @PostMapping("customerfunctioncollect") public Result customerFunctionCollect(@LoginUser TokenDto tokenDto, @RequestBody CustomerFunctionCollectFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, CustomerFunctionCollectFormDTO.AddUserInternalGroup.class, CustomerFunctionCollectFormDTO.AddUserShowGroup.class); - customerFunctionDetailService.customerFunctionCollect(formDTO); - return new Result(); + return customerFunctionDetailService.customerFunctionCollect(formDTO); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java index 1a6572179d..bfbefc518d 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java @@ -19,9 +19,11 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.CustomerFunctionDetailDTO; +import com.epmet.dto.form.CustomerFunctionCollectFormDTO; import com.epmet.dto.form.FunctionDetailFromDTO; import com.epmet.dto.form.UpdateCustomerFunctionFormDTO; import com.epmet.dto.form.UpdateShoppingStatusFormDTO; +import com.epmet.dto.result.CustomerFunctionCollectResultDTO; import com.epmet.dto.result.CustomerResultDTO; import com.epmet.dto.result.FunctionDetailResultDTO; import com.epmet.entity.CustomerFunctionDetailEntity; @@ -101,4 +103,12 @@ public interface CustomerFunctionDetailDao extends BaseDao= NumConstant.ONE) { + return new Result().error(8000, String.format("当前客户在[%s]已存在12个上线功能,不允许再次采集!", dto.getFromAppName())); + } + //1.查询定制功能详细信息 FunctionCustomizedDTO functionDTO = functionCustomizedDao.selectByFunctionId(formDTO.getFunctionId()); if(functionDTO == null){ @@ -259,6 +263,7 @@ public class CustomerFunctionDetailServiceImpl extends BaseServiceImpl + + + UPDATE customer_function_detail SET