|
@@ -1,6 +1,7 @@
|
|
package com.xjrsoft.module.system.controller;
|
|
package com.xjrsoft.module.system.controller;
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
|
+import cn.hutool.core.bean.BeanUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.xjrsoft.common.model.result.RT;
|
|
import com.xjrsoft.common.model.result.RT;
|
|
@@ -8,19 +9,25 @@ import com.xjrsoft.common.page.ConventPage;
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
import com.xjrsoft.common.page.PageOutput;
|
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
import com.xjrsoft.module.system.dto.AddXjrMenuGroupDto;
|
|
import com.xjrsoft.module.system.dto.AddXjrMenuGroupDto;
|
|
|
|
+import com.xjrsoft.module.system.dto.AddXjrMenuGroupSetDto;
|
|
|
|
+import com.xjrsoft.module.system.dto.UpdateXjrMenuGroupSetDto;
|
|
import com.xjrsoft.module.system.dto.XjrMenuGroupMenuListDto;
|
|
import com.xjrsoft.module.system.dto.XjrMenuGroupMenuListDto;
|
|
import com.xjrsoft.module.system.dto.XjrMenuGroupSetPageDto;
|
|
import com.xjrsoft.module.system.dto.XjrMenuGroupSetPageDto;
|
|
import com.xjrsoft.module.system.entity.XjrMenuGroupSet;
|
|
import com.xjrsoft.module.system.entity.XjrMenuGroupSet;
|
|
import com.xjrsoft.module.system.service.IXjrMenuGroupSetService;
|
|
import com.xjrsoft.module.system.service.IXjrMenuGroupSetService;
|
|
import com.xjrsoft.module.system.vo.XjrMenuGroupMenuListVo;
|
|
import com.xjrsoft.module.system.vo.XjrMenuGroupMenuListVo;
|
|
import com.xjrsoft.module.system.vo.XjrMenuGroupSetPageVo;
|
|
import com.xjrsoft.module.system.vo.XjrMenuGroupSetPageVo;
|
|
|
|
+import com.xjrsoft.module.system.vo.XjrMenuGroupSetVo;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
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.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
@@ -55,41 +62,41 @@ public class XjrMenuGroupSetController {
|
|
return RT.ok(pageOutput);
|
|
return RT.ok(pageOutput);
|
|
}
|
|
}
|
|
|
|
|
|
-// @GetMapping(value = "/info")
|
|
|
|
-// @ApiOperation(value="根据id查询功能分类设置信息")
|
|
|
|
-// @SaCheckPermission("xjrmenugroupset:detail")
|
|
|
|
-// public RT<XjrMenuGroupSetVo> info(@RequestParam Long id){
|
|
|
|
-// XjrMenuGroupSet xjrMenuGroupSet = xjrMenuGroupSetService.getByIdDeep(id);
|
|
|
|
-// if (xjrMenuGroupSet == null) {
|
|
|
|
-// return RT.error("找不到此数据!");
|
|
|
|
-// }
|
|
|
|
-// return RT.ok(BeanUtil.toBean(xjrMenuGroupSet, XjrMenuGroupSetVo.class));
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-//
|
|
|
|
-// @PostMapping
|
|
|
|
-// @ApiOperation(value = "新增功能分类设置")
|
|
|
|
-// @SaCheckPermission("xjrmenugroupset:add")
|
|
|
|
-// public RT<Boolean> add(@Valid @RequestBody AddXjrMenuGroupSetDto dto){
|
|
|
|
-// XjrMenuGroupSet xjrMenuGroupSet = BeanUtil.toBean(dto, XjrMenuGroupSet.class);
|
|
|
|
-// boolean isSuccess = xjrMenuGroupSetService.add(xjrMenuGroupSet);
|
|
|
|
-// return RT.ok(isSuccess);
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// @PutMapping
|
|
|
|
-// @ApiOperation(value = "修改功能分类设置")
|
|
|
|
-// @SaCheckPermission("xjrmenugroupset:edit")
|
|
|
|
-// public RT<Boolean> update(@Valid @RequestBody UpdateXjrMenuGroupSetDto dto){
|
|
|
|
-// XjrMenuGroupSet xjrMenuGroupSet = BeanUtil.toBean(dto, XjrMenuGroupSet.class);
|
|
|
|
-// return RT.ok(xjrMenuGroupSetService.update(xjrMenuGroupSet));
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// @DeleteMapping
|
|
|
|
-// @ApiOperation(value = "删除功能分类设置")
|
|
|
|
-// @SaCheckPermission("xjrmenugroupset:delete")
|
|
|
|
-// public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
|
|
|
|
-// return RT.ok(xjrMenuGroupSetService.delete(ids));
|
|
|
|
-// }
|
|
|
|
|
|
+ @GetMapping(value = "/info")
|
|
|
|
+ @ApiOperation(value="根据id查询功能分类设置信息")
|
|
|
|
+ @SaCheckPermission("xjrmenugroupset:detail")
|
|
|
|
+ public RT<XjrMenuGroupSetVo> info(@RequestParam Long id){
|
|
|
|
+ XjrMenuGroupSet xjrMenuGroupSet = xjrMenuGroupSetService.getByIdDeep(id);
|
|
|
|
+ if (xjrMenuGroupSet == null) {
|
|
|
|
+ return RT.error("找不到此数据!");
|
|
|
|
+ }
|
|
|
|
+ return RT.ok(BeanUtil.toBean(xjrMenuGroupSet, XjrMenuGroupSetVo.class));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @PostMapping
|
|
|
|
+ @ApiOperation(value = "新增功能分类设置")
|
|
|
|
+ @SaCheckPermission("xjrmenugroupset:add")
|
|
|
|
+ public RT<Boolean> add(@Valid @RequestBody AddXjrMenuGroupSetDto dto){
|
|
|
|
+ XjrMenuGroupSet xjrMenuGroupSet = BeanUtil.toBean(dto, XjrMenuGroupSet.class);
|
|
|
|
+ boolean isSuccess = xjrMenuGroupSetService.add(xjrMenuGroupSet);
|
|
|
|
+ return RT.ok(isSuccess);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PutMapping
|
|
|
|
+ @ApiOperation(value = "修改功能分类设置")
|
|
|
|
+ @SaCheckPermission("xjrmenugroupset:edit")
|
|
|
|
+ public RT<Boolean> update(@Valid @RequestBody UpdateXjrMenuGroupSetDto dto){
|
|
|
|
+ XjrMenuGroupSet xjrMenuGroupSet = BeanUtil.toBean(dto, XjrMenuGroupSet.class);
|
|
|
|
+ return RT.ok(xjrMenuGroupSetService.update(xjrMenuGroupSet));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @DeleteMapping
|
|
|
|
+ @ApiOperation(value = "删除功能分类设置")
|
|
|
|
+ @SaCheckPermission("xjrmenugroupset:delete")
|
|
|
|
+ public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
|
|
|
|
+ return RT.ok(xjrMenuGroupSetService.delete(ids));
|
|
|
|
+ }
|
|
|
|
|
|
@GetMapping(value = "/menu-list")
|
|
@GetMapping(value = "/menu-list")
|
|
@ApiOperation(value = "查询学生菜单")
|
|
@ApiOperation(value = "查询学生菜单")
|