From bf494e34c113b4a7f4035cbc1c78d65f56de161a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 20 Jan 2022 16:51:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=94=AF=E4=B8=80=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/IcResiDemandDictServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java index 0e352910c6..e5a54cfa61 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java @@ -81,6 +81,7 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl NumConstant.ZERO) { // 名称唯一 throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format("【%s】已存在", formDTO.getCategoryName()), "分类名称已存在"); @@ -105,6 +106,7 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl NumConstant.ZERO) { + if (checkCategoryName(formDTO.getCustomerId(), formDTO.getCategoryName(), formDTO.getLevel(), origin.getParentCode(), formDTO.getCategoryId()) > NumConstant.ZERO) { // 名称唯一 throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format("【%s】已存在", formDTO.getCategoryName()), "分类名称已存在"); } From 655c534c4053d9be1e5270c71c94935dabeba743 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Thu, 20 Jan 2022 17:14:37 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=B7=B2=E7=BB=8F=E5=8D=A0=E7=94=A8?= =?UTF-8?q?=E7=9A=84=E7=BC=96=E7=A0=81=E4=B9=9F=E4=B8=8D=E8=83=BD=E5=86=8D?= =?UTF-8?q?=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/IcResiDemandDictDao.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml index 36aa408316..0d7a8dc0a7 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcResiDemandDictDao.xml @@ -192,9 +192,7 @@ CONVERT ( m.CATEGORY_CODE, UNSIGNED )) AS maxFirstCategoryCode FROM ic_resi_demand_dict m - WHERE - m.DEL_FLAG = '0' - AND m.CUSTOMER_ID = #{customerId} + WHERE m.CUSTOMER_ID = #{customerId} AND m.`LEVEL` = #{level} and m.parent_code=#{parentCode}