正在显示
1 个修改的文件
包含
12 行增加
和
12 行删除
| @@ -136,18 +136,18 @@ public class AiragButtonController extends JeecgController<AiragButton, IAiragBu | @@ -136,18 +136,18 @@ public class AiragButtonController extends JeecgController<AiragButton, IAiragBu | ||
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | // 检查按钮开关是否为开启状态 | 138 | // 检查按钮开关是否为开启状态 |
| 139 | - if ("Y".equals(airagButton.getButtonSwitch())) { | ||
| 140 | - // 查询当前已开启的按钮数量(排除自身) | ||
| 141 | - QueryWrapper<AiragButton> queryWrapper = new QueryWrapper<>(); | ||
| 142 | - queryWrapper.eq("button_switch", "Y") | ||
| 143 | - .ne("id", airagButton.getId()); // 排除当前正在编辑的按钮 | ||
| 144 | - long openedButtonCount = airagButtonService.count(queryWrapper); | ||
| 145 | - | ||
| 146 | - // 如果已开启的按钮数量超过或等于5个,则返回错误提示 | ||
| 147 | - if (openedButtonCount >= 5) { | ||
| 148 | - return Result.error("按钮超过五个,请先关闭一个按钮"); | ||
| 149 | - } | ||
| 150 | - } | 139 | +// if ("Y".equals(airagButton.getButtonSwitch())) { |
| 140 | +// // 查询当前已开启的按钮数量(排除自身) | ||
| 141 | +// QueryWrapper<AiragButton> queryWrapper = new QueryWrapper<>(); | ||
| 142 | +// queryWrapper.eq("button_switch", "Y") | ||
| 143 | +// .ne("id", airagButton.getId()); // 排除当前正在编辑的按钮 | ||
| 144 | +// long openedButtonCount = airagButtonService.count(queryWrapper); | ||
| 145 | +// | ||
| 146 | +// // 如果已开启的按钮数量超过或等于5个,则返回错误提示 | ||
| 147 | +// if (openedButtonCount >= 5) { | ||
| 148 | +// return Result.error("按钮超过五个,请先关闭一个按钮"); | ||
| 149 | +// } | ||
| 150 | +// } | ||
| 151 | airagButtonService.updateById(airagButton); | 151 | airagButtonService.updateById(airagButton); |
| 152 | return Result.OK("编辑成功!"); | 152 | return Result.OK("编辑成功!"); |
| 153 | } | 153 | } |
-
请 注册 或 登录 后发表评论