From 0a2f6f78683ba1c4e07f1359c1e7bf105a4bd507 Mon Sep 17 00:00:00 2001
From: 潘志宝 <979469083@qq.com>
Date: 星期一, 23 九月 2024 13:59:07 +0800
Subject: [PATCH] mpk 分组管理

---
 iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/DmModuleController.java |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/DmModuleController.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/DmModuleController.java
index 8e1089c..9082921 100644
--- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/DmModuleController.java
+++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mcs/pre/controller/admin/DmModuleController.java
@@ -9,6 +9,7 @@
 import com.iailab.module.model.mcs.pre.vo.DmModulePageReqVO;
 import com.iailab.module.model.mcs.pre.vo.DmModuleRespVO;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
@@ -23,7 +24,7 @@
  * @date 2021年04月23日 9:05
  */
 @RestController
-@RequestMapping("/pre/module")
+@RequestMapping("/model/pre/module")
 public class DmModuleController {
 
     @Autowired
@@ -33,6 +34,7 @@
      * 管网列表
      */
     @GetMapping("/page")
+    @PreAuthorize("@ss.hasPermission('model:pre-module:query')")
     public CommonResult<PageResult<DmModuleRespVO>> page(@Validated DmModulePageReqVO reqVO) {
         PageResult<DmModuleEntity> page = dmModuleService.queryPage(reqVO);
 
@@ -43,6 +45,7 @@
      * 管网列表
      */
     @GetMapping("/list")
+    @PreAuthorize("@ss.hasPermission('model:pre-module:query')")
     public CommonResult<List<DmModuleEntity>> list(@RequestParam Map<String, Object> params) {
         List<DmModuleEntity> list = dmModuleService.list(params);
 
@@ -53,6 +56,7 @@
      * 管网信息
      */
     @GetMapping("/get/{id}")
+    @PreAuthorize("@ss.hasPermission('model:pre-module:query')")
     public CommonResult<DmModuleEntity> info(@PathVariable("id") String id){
         DmModuleEntity info = dmModuleService.selectById(id);
 
@@ -63,6 +67,7 @@
      * 保存管网
      */
     @PostMapping("/create")
+    @PreAuthorize("@ss.hasPermission('model:pre-module:create')")
     public CommonResult<Boolean> save(@RequestBody DmModuleEntity module){
         int count = dmModuleService.check(module);
         if (count > 0) {
@@ -77,6 +82,7 @@
      * 修改管网
      */
     @PutMapping("/update")
+    @PreAuthorize("@ss.hasPermission('model:pre-module:update')")
     public CommonResult<Boolean> update(@RequestBody DmModuleEntity module){
         dmModuleService.update(module);
         return success(true);
@@ -86,6 +92,7 @@
      * 删除管网
      */
     @DeleteMapping("/delete")
+    @PreAuthorize("@ss.hasPermission('model:pre-module:delete')")
     public CommonResult<Boolean> delete(@RequestParam("id") String id){
         dmModuleService.deleteBatch(new String[]{id});
         return success(true);

--
Gitblit v1.9.3