From bbbe77232a352e97be92d6fa04461ef36589818b Mon Sep 17 00:00:00 2001 From: dy-hu Date: Tue, 9 Jul 2024 09:18:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=9A=E5=91=98=E7=AD=89=E7=BA=A7=E6=88=90?= =?UTF-8?q?=E9=95=BF=E5=80=BC=E6=A0=A1=E9=AA=8C=E5=AE=8C=E5=96=84=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../member/impl/CerePlatformMemberLevelServiceImpl.java | 8 ++++---- .../mybatis/mapper/member/CerePlatformMemberLevelDAO.xml | 2 +- .../business/dao/member/CerePlatformMemberLevelDAO.java | 2 +- .../member/impl/CerePlatformMemberLevelServiceImpl.java | 10 +++++----- .../mybatis/mapper/member/CerePlatformMemberLevelDAO.xml | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/member/impl/CerePlatformMemberLevelServiceImpl.java b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/member/impl/CerePlatformMemberLevelServiceImpl.java index 8baa5f7..dc092c4 100644 --- a/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/member/impl/CerePlatformMemberLevelServiceImpl.java +++ b/cereshop-admin/src/main/java/com/shop/cereshop/admin/service/member/impl/CerePlatformMemberLevelServiceImpl.java @@ -44,9 +44,9 @@ public class CerePlatformMemberLevelServiceImpl implements CerePlatformMemberLev @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) public void save(MemberLevelSaveParam param, CerePlatformUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); - if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), null) > 0) { +/* if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), null) > 0) { throw new CoBusinessException(CoReturnFormat.EXIST_MEMBER_LEVEL); - } + }*/ if (param.getGrowth() != 0 && cerePlatformMemberLevelDAO.countByGrowth(0) == 0) { throw new CoBusinessException(CoReturnFormat.NEED_ZERO_GROWTH); } @@ -67,9 +67,9 @@ public class CerePlatformMemberLevelServiceImpl implements CerePlatformMemberLev @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) public void update(MemberLevelUpdateParam param, CerePlatformUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); - if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), param.getMemberLevelId()) > 0) { +/* if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), param.getMemberLevelId()) > 0) { throw new CoBusinessException(CoReturnFormat.EXIST_MEMBER_LEVEL); - } + }*/ CerePlatformMemberLevel oldLevel = cerePlatformMemberLevelDAO.selectByPrimaryKey(param.getMemberLevelId()); if (oldLevel == null) { throw new CoBusinessException(CoReturnFormat.PARAM_INVALID); diff --git a/cereshop-admin/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml b/cereshop-admin/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml index 184ebce..43dc959 100644 --- a/cereshop-admin/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml +++ b/cereshop-admin/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml @@ -160,6 +160,6 @@ diff --git a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/member/CerePlatformMemberLevelDAO.java b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/member/CerePlatformMemberLevelDAO.java index a4ef8c2..8a4d12f 100644 --- a/cereshop-business/src/main/java/com/shop/cereshop/business/dao/member/CerePlatformMemberLevelDAO.java +++ b/cereshop-business/src/main/java/com/shop/cereshop/business/dao/member/CerePlatformMemberLevelDAO.java @@ -39,5 +39,5 @@ public interface CerePlatformMemberLevelDAO extends BaseMapper 0) { +/* if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), null) > 0) { throw new CoBusinessException(CoReturnFormat.EXIST_MEMBER_LEVEL); - } - if (param.getGrowth() != 0 && cerePlatformMemberLevelDAO.countByGrowth(0) == 0) { + }*/ + if (param.getGrowth() != 0 && cerePlatformMemberLevelDAO.countByGrowth(user.getBusinessId(), 0) == 0) { throw new CoBusinessException(CoReturnFormat.NEED_ZERO_GROWTH); } CerePlatformMemberLevel memberLevel=new CerePlatformMemberLevel(); @@ -73,9 +73,9 @@ public class CerePlatformMemberLevelServiceImpl implements CerePlatformMemberLev @Transactional(isolation= Isolation.DEFAULT,propagation= Propagation.REQUIRED,rollbackFor = {CoBusinessException.class, Exception.class}) public void update(MemberLevelUpdateParam param, CerePlatformBusinessUser user) throws CoBusinessException { String time= TimeUtils.yyMMddHHmmss(); - if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), param.getMemberLevelId()) > 0) { + /*if (cerePlatformMemberLevelDAO.countMemberLevel(StringUtils.trim(param.getMemberLevelName()), param.getGrowth(), param.getMemberLevelId()) > 0) { throw new CoBusinessException(CoReturnFormat.EXIST_MEMBER_LEVEL); - } + }*/ CerePlatformMemberLevel oldLevel = cerePlatformMemberLevelDAO.selectByPrimaryKey(param.getMemberLevelId()); if (oldLevel == null) { throw new CoBusinessException(CoReturnFormat.PARAM_INVALID); diff --git a/cereshop-business/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml b/cereshop-business/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml index 7aa36a1..3e41094 100644 --- a/cereshop-business/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml +++ b/cereshop-business/src/main/resources/mybatis/mapper/member/CerePlatformMemberLevelDAO.xml @@ -164,6 +164,6 @@