|
|
@@ -235,6 +235,13 @@ public class StorePlatformMenuServiceImpl extends ServiceImpl<StorePlatformMenuM
|
|
|
|
|
|
currentMenu.setUpdatedTime(new Date());
|
|
|
currentMenu.setUpdateBy("admin");
|
|
|
+ // 切换状态:0启用,1禁用
|
|
|
+ String newStatus = "0".equals(currentMenu.getStatus()) ? "1" : "0";
|
|
|
+ currentMenu.setStatus(newStatus);
|
|
|
+ // 如果状态为空,默认设置为"0"(开启)
|
|
|
+ if (!StringUtils.hasText(currentMenu.getStatus())) {
|
|
|
+ currentMenu.setStatus("0");
|
|
|
+ }
|
|
|
|
|
|
// 4. 校验菜单名称是否重复(同一父菜单下不能有重名)
|
|
|
LambdaQueryWrapper<StorePlatformMenu> nameCheck = new LambdaQueryWrapper<>();
|
|
|
@@ -287,10 +294,7 @@ public class StorePlatformMenuServiceImpl extends ServiceImpl<StorePlatformMenuM
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // 如果状态为空,默认设置为"0"(开启)
|
|
|
- if (!StringUtils.hasText(currentMenu.getStatus())) {
|
|
|
- currentMenu.setStatus("0");
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
return R.data(currentMenu);
|
|
|
}
|