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} + +