From 09c41523c7dc4779f1864b17d88f988b791a6158 Mon Sep 17 00:00:00 2001 From: qiezi <15576055375@163.com> Date: Fri, 11 Oct 2024 10:24:35 +0800 Subject: [PATCH] 2024-10-11 --- .../spring/modules/sys/service/impl/DictTypeServiceImpl.java | 5 ++--- src/main/resources/mapper/sys/DictTypeDao.xml | 3 --- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/spring/modules/sys/service/impl/DictTypeServiceImpl.java b/src/main/java/com/spring/modules/sys/service/impl/DictTypeServiceImpl.java index ba97fed3..79dba979 100644 --- a/src/main/java/com/spring/modules/sys/service/impl/DictTypeServiceImpl.java +++ b/src/main/java/com/spring/modules/sys/service/impl/DictTypeServiceImpl.java @@ -82,7 +82,7 @@ public class DictTypeServiceImpl extends ServiceImpl impl } dictGroupService.lambdaUpdate().eq(DictGroup::getDictType, entity.getDictType()).eq(DictGroup::getSite, entity.getSite()).remove(); dictGroupService.save(new DictGroup(entity.getSite(),entity.getDictType(),entity.getMenuId())); - return true; + return super.updateById(entity); } @Override @@ -91,10 +91,9 @@ public class DictTypeServiceImpl extends ServiceImpl impl if (Objects.isNull(entity)||Objects.isNull(entity.getDictId())){ throw new RuntimeException("字典编码为空"); } - removeById(entity.getDictId()); dictGroupService.lambdaUpdate().eq(DictGroup::getSite,entity.getSite()).eq(DictGroup::getDictType,entity.getDictType()).remove(); dictDataService.lambdaUpdate().eq(DictData::getSite,entity.getSite()).eq(DictData::getDictType,entity.getDictType()).remove(); - return true; + return removeById(entity.getDictId()); } @Override diff --git a/src/main/resources/mapper/sys/DictTypeDao.xml b/src/main/resources/mapper/sys/DictTypeDao.xml index e575fe09..034cacd4 100644 --- a/src/main/resources/mapper/sys/DictTypeDao.xml +++ b/src/main/resources/mapper/sys/DictTypeDao.xml @@ -33,9 +33,6 @@ and g.menu_id = #{menuId} - - and g.menu_id = #{menuId} - and g.menu_id is null