From 8b5988c329e17efc880d441b23d04caf9ea56746 Mon Sep 17 00:00:00 2001 From: "rong.liu" Date: Mon, 8 Jul 2024 15:51:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E8=84=9A=E8=AE=BE=E7=BD=AEbug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iasf/controller/CategoryController.java | 4 +- .../iasf/mapper/SysNavigationIconMapper.java | 3 +- .../mapper/xml/SysNavigationIconMapper.xml | 9 ++ .../iasf/service/SysCategoryService.java | 4 +- .../service/impl/CategoryServiceImpl.java | 10 +- .../impl/SysFooterSetupServiceImpl.java | 99 +++++++++++-------- .../impl/SysNavigationIconServiceImpl.java | 2 +- .../com/huoran/iasf/vo/req/SortOrderReq.java | 10 +- 8 files changed, 86 insertions(+), 55 deletions(-) diff --git a/src/main/java/com/huoran/iasf/controller/CategoryController.java b/src/main/java/com/huoran/iasf/controller/CategoryController.java index d624a79..c1fabfd 100644 --- a/src/main/java/com/huoran/iasf/controller/CategoryController.java +++ b/src/main/java/com/huoran/iasf/controller/CategoryController.java @@ -47,10 +47,10 @@ public class CategoryController { boolean isDuplicate = false; if (category.getCategoryId() != null) { // 更新逻辑,排除当前记录自身 - isDuplicate = service.existsOtherByName(category.getName(), category.getCategoryId(), category.getSiteId()); + isDuplicate = service.existsOtherByName(category.getName(), category.getCategoryId(), category.getSiteId(),category.getType()); } else { // 新增逻辑,直接检查名称是否存在 - isDuplicate = service.existsByName(category.getName(), category.getSiteId()); + isDuplicate = service.existsByName(category.getName(), category.getSiteId(),category.getType()); } if (isDuplicate) { diff --git a/src/main/java/com/huoran/iasf/mapper/SysNavigationIconMapper.java b/src/main/java/com/huoran/iasf/mapper/SysNavigationIconMapper.java index 399ec6f..a519f00 100644 --- a/src/main/java/com/huoran/iasf/mapper/SysNavigationIconMapper.java +++ b/src/main/java/com/huoran/iasf/mapper/SysNavigationIconMapper.java @@ -17,8 +17,7 @@ import java.util.List; */ public interface SysNavigationIconMapper extends BaseMapper { // 更新单个记录的sort_order - @Update("UPDATE sys_navigation_icon SET sort_order = #{sortOrder} WHERE id = #{id}") - void updateSortOrder(@Param("id") Integer id, @Param("sortOrder") Integer sortOrder); + void updateSortOrder(@Param("id") Integer id, @Param("sortOrder") Integer sortOrder,@Param("icon") String icon); List listBySiteIdAndStatus(@Param("siteId") Integer siteId, @Param("isDisable") Integer disableStatus, diff --git a/src/main/java/com/huoran/iasf/mapper/xml/SysNavigationIconMapper.xml b/src/main/java/com/huoran/iasf/mapper/xml/SysNavigationIconMapper.xml index 477f3b1..f78304e 100644 --- a/src/main/java/com/huoran/iasf/mapper/xml/SysNavigationIconMapper.xml +++ b/src/main/java/com/huoran/iasf/mapper/xml/SysNavigationIconMapper.xml @@ -1,6 +1,15 @@ + + UPDATE sys_navigation_icon + SET sort_order = #{sortOrder} + + , icon = #{icon} + + WHERE id = #{id} + +