|
|
@@ -1,42 +1,37 @@
|
|
|
package com.xjrsoft.module.system.controller;
|
|
|
|
|
|
+import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
-import cn.hutool.core.util.ObjectUtil;
|
|
|
-import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.github.yulichang.toolkit.MPJWrappers;
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
-import com.xjrsoft.common.constant.GlobalConstant;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
|
|
+import com.xjrsoft.common.model.result.RT;
|
|
|
import com.xjrsoft.common.page.ConventPage;
|
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
|
-import com.xjrsoft.common.model.result.RT;
|
|
|
-import com.xjrsoft.common.utils.TreeUtil;
|
|
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.module.system.dto.AddSystemMenuCommonlyUsedDto;
|
|
|
-import com.xjrsoft.module.system.dto.UpdateSystemMenuCommonlyUsedDto;
|
|
|
-import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
-
|
|
|
import com.xjrsoft.module.system.dto.SystemMenuCommonlyUsedPageDto;
|
|
|
-import com.xjrsoft.module.system.entity.Menu;
|
|
|
+import com.xjrsoft.module.system.dto.UpdateSystemMenuCommonlyUsedDto;
|
|
|
import com.xjrsoft.module.system.entity.SystemMenuCommonlyUsed;
|
|
|
import com.xjrsoft.module.system.service.ISystemMenuCommonlyUsedService;
|
|
|
-import com.xjrsoft.module.system.vo.MenuTreeVo;
|
|
|
import com.xjrsoft.module.system.vo.SystemMenuCommonlyUsedPageVo;
|
|
|
-
|
|
|
import com.xjrsoft.module.system.vo.SystemMenuCommonlyUsedVo;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
-import javax.validation.constraints.NotNull;
|
|
|
import java.util.List;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* @title: 常用功能设置
|
|
|
@@ -116,9 +111,12 @@ public class SystemMenuCommonlyUsedController {
|
|
|
@ApiOperation(value = "新增常用功能设置")
|
|
|
@SaCheckPermission("systemmenucommonlyused:add")
|
|
|
public RT<Boolean> add(@Valid @RequestBody AddSystemMenuCommonlyUsedDto dto){
|
|
|
+ if(dto.getMenuId() == null){
|
|
|
+ return RT.error("菜单id缺失");
|
|
|
+ }
|
|
|
SystemMenuCommonlyUsed systemMenuCommonlyUsed = BeanUtil.toBean(dto, SystemMenuCommonlyUsed.class);
|
|
|
boolean isSuccess = systemMenuCommonlyUsedService.save(systemMenuCommonlyUsed);
|
|
|
- return RT.ok(isSuccess);
|
|
|
+ return RT.ok(isSuccess);
|
|
|
}
|
|
|
|
|
|
@PutMapping
|