From 671903ccfb86468f35bf6bd96a8297be676a6c12 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 21 Aug 2020 10:09:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E5=88=B6=E5=8A=9F=E8=83=BD=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E6=B7=BB=E5=8A=A0=E6=98=AF=E5=90=A6=E6=9C=89=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E4=BD=BF=E7=94=A8=E5=AD=97=E6=AE=B5=E3=80=81=E9=87=87?= =?UTF-8?q?=E9=9B=86=E4=B8=8D=E5=B1=95=E7=A4=BA=E4=B8=8B=E6=9E=B6=E7=9A=84?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=B2=A1=E6=9C=89=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E3=80=81=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AD=97=E6=AE=B5=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/FunctionCustomizedDetailResultDTO.java | 7 ++++++- .../service/impl/FunctionCustomizedServiceImpl.java | 10 ++++++++++ .../resources/db/migration/V0.0.5__add_del_flag.sql | 5 +++++ .../main/resources/mapper/FunctionCustomizedDao.xml | 3 ++- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FunctionCustomizedDetailResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FunctionCustomizedDetailResultDTO.java index b9f30936f9..e232ce5f2f 100644 --- a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FunctionCustomizedDetailResultDTO.java +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/FunctionCustomizedDetailResultDTO.java @@ -32,7 +32,7 @@ public class FunctionCustomizedDetailResultDTO implements Serializable { /** * 默认名称 */ - private String customizedName; + private String functionName; /** * 默认大图标 @@ -58,4 +58,9 @@ public class FunctionCustomizedDetailResultDTO implements Serializable { * 来源app(工作端:gov、居民端:resi) */ private String fromApp; + + /** + * 是否有客户在使用(0:否 1:是) + */ + private Integer isApply; } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionCustomizedServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionCustomizedServiceImpl.java index b5c599be12..6d75012e1e 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionCustomizedServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/FunctionCustomizedServiceImpl.java @@ -144,7 +144,17 @@ public class FunctionCustomizedServiceImpl extends BaseServiceImpl getFunctionCustomized(CommonFunctionIdFormDTO formDTO) { + //1.查询定制功能详情信息 FunctionCustomizedDetailResultDTO resultDTO = baseDao.getFunctionCustomizedByFunctionId(formDTO); + + //2.查询是否有客户在使用当前定制功能 + CustomerFunctionDetailEntity entity = customerFunctionDetailService.selectById(formDTO.getFunctionId()); + if (null == entity || null == entity.getFunctionId()) { + resultDTO.setIsApply(NumConstant.ZERO); + } else { + resultDTO.setIsApply(NumConstant.ONE); + } + return new Result().ok(resultDTO); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__add_del_flag.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__add_del_flag.sql index 73725ab557..e34bafd2b5 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__add_del_flag.sql +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.5__add_del_flag.sql @@ -1 +1,6 @@ ALTER TABLE function_shopping_history ADD ( DEL_FLAG INT ( 11 ) NOT NULL COMMENT '删除标识(0.未删除 1.已删除)'); + + +ALTER TABLE `customer_function_detail` +MODIFY COLUMN `DOMAIN_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '自定义业务域名(可设置多个 用分号分隔)' AFTER `ICON_SMALL_IMG`; + diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml index b9e44d268a..e1ad29efb4 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/FunctionCustomizedDao.xml @@ -9,7 +9,7 @@ cu.FUNCTION_ID functionId, f.SHOPPING_STATUS shoppingStatus, f.FUNCTION_EXPLAIN functionExplain, - cu.CUSTOMIZED_NAME customizedName, + cu.CUSTOMIZED_NAME functionName, cu.ICON_LARGE_IMG iconLargeImg, cu.ICON_SMALL_IMG iconSmallImg, cu.TARGET_LINK targetLink, @@ -113,6 +113,7 @@ WHERE fc.DEL_FLAG = '0' AND f.DEL_FLAG = '0' + AND f.shopping_status = '1' fc.FUNCTION_ID != #{functionId}