Переглянути джерело

1、修改启用停用方法

zhoux 2 роки тому
батько
коміт
c7de72becd

+ 2 - 2
src/main/java/com/dk/mdm/controller/core/DictionaryDataController.java

@@ -67,7 +67,7 @@ public class DictionaryDataController{
      */
     @ApiOperation(value = "停用" , notes = "停用")
     @PostMapping("disable/{id}")
-    public ResponseResultVO<Boolean> disable(@PathVariable Long id){
+    public ResponseResultVO<Boolean> disable(@PathVariable String id){
         return this.getService().disable(id);
     }
 
@@ -78,7 +78,7 @@ public class DictionaryDataController{
      */
     @ApiOperation(value = "启用", notes = "启用")
     @PostMapping("enable/{id}")
-    public ResponseResultVO<Boolean> enable(@PathVariable Long id){
+    public ResponseResultVO<Boolean> enable(@PathVariable String id){
         return this.getService().enable(id);
     }
 }

+ 2 - 4
src/main/java/com/dk/mdm/controller/core/FactoryController.java

@@ -81,7 +81,7 @@ public class FactoryController{
      */
     @ApiOperation(value = "停用", notes = "停用")
     @PostMapping("disable/{id}")
-    public ResponseResultVO<Boolean> disable(@PathVariable Long id) {
+    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
         return this.getService().disable(id);
     }
 
@@ -92,7 +92,5 @@ public class FactoryController{
      */
     @ApiOperation(value = "启用", notes = "启用")
     @PostMapping("enable/{id}")
-    public ResponseResultVO<Boolean> enable(@PathVariable Long id) {
-        return this.getService().enable(id);
-    }
+    public ResponseResultVO<Boolean> enable(@PathVariable String id) {return this.getService().enable(id); }
 }

+ 2 - 2
src/main/java/com/dk/mdm/controller/core/JobController.java

@@ -91,7 +91,7 @@ public class JobController{
      */
     @ApiOperation(value = "停用", notes = "停用")
     @PostMapping("disable/{id}")
-    public ResponseResultVO<Boolean> disable(@PathVariable Long id) {
+    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
         return this.getService().disable(id);
     }
 
@@ -102,7 +102,7 @@ public class JobController{
     */
     @ApiOperation(value = "启用", notes = "启用")
     @PostMapping("enable/{id}")
-    public ResponseResultVO<Boolean> enable(@PathVariable Long id) {
+    public ResponseResultVO<Boolean> enable(@PathVariable String id) {
         return this.getService().enable(id);
     }
 }

+ 2 - 2
src/main/java/com/dk/mdm/controller/core/PostController.java

@@ -75,7 +75,7 @@ public class PostController{
      */
     @ApiOperation(value = "停用", notes = "停用")
     @PostMapping("disable/{id}")
-    public ResponseResultVO<Boolean> disable(@PathVariable Long id) {
+    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
         return this.getService().disable(id);
     }
 
@@ -86,7 +86,7 @@ public class PostController{
      */
     @ApiOperation(value = "启用", notes = "启用")
     @PostMapping("enable/{id}")
-    public ResponseResultVO<Boolean> enable(@PathVariable Long id) {
+    public ResponseResultVO<Boolean> enable(@PathVariable String id) {
         return this.getService().enable(id);
     }
 }

+ 2 - 2
src/main/java/com/dk/mdm/controller/core/UserController.java

@@ -130,7 +130,7 @@ public class UserController{
      */
     @ApiOperation(value = "停用", notes = "停用")
     @PostMapping("disable/{id}")
-    public ResponseResultVO<Boolean> disable(@PathVariable Long id) {
+    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
         return this.getService().disable(id);
     }
 
@@ -141,7 +141,7 @@ public class UserController{
      */
     @ApiOperation(value = "启用", notes = "启用")
     @PostMapping("enable/{id}")
-    public ResponseResultVO<Boolean> enable(@PathVariable Long id) {
+    public ResponseResultVO<Boolean> enable(@PathVariable String id) {
         return this.getService().enable(id);
     }
 

+ 20 - 0
src/main/java/com/dk/mdm/controller/mst/RoleController.java

@@ -82,4 +82,24 @@ public class RoleController{
     public ResponseResultVO<?> deactivateEnable(@RequestBody RoleVo roleVO) {
         return roleService.deactivateEnable(roleVO);
     }
+
+    /**
+     * @desc : 停用
+     * @author : 于继渤
+     * @date :  2023/1/4 9:39
+     */
+    @PostMapping("disable/{id}")
+    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
+        return this.getService().disable(id);
+    }
+
+    /**
+     * @desc : 启用
+     * @author : 于继渤
+     * @date :  2023/1/4 9:39
+     */
+    @PostMapping("enable/{id}")
+    public ResponseResultVO<Boolean> enable(@PathVariable String id) {
+        return this.getService().enable(id);
+    }
 }

+ 2 - 2
src/main/java/com/dk/mdm/controller/mst/StaffController.java

@@ -100,7 +100,7 @@ public class StaffController{
      */
     @ApiOperation(value = "停用", notes = "停用")
     @PostMapping("disable/{id}")
-    public ResponseResultVO<Boolean> disable(@PathVariable Long id) {
+    public ResponseResultVO<Boolean> disable(@PathVariable String id) {
         return this.getService().disable(id);
     }
 
@@ -111,7 +111,7 @@ public class StaffController{
      */
     @ApiOperation(value = "启用", notes = "启用")
     @PostMapping("enable/{id}")
-    public ResponseResultVO<Boolean> enable(@PathVariable Long id) {
+    public ResponseResultVO<Boolean> enable(@PathVariable String id) {
         return this.getService().enable(id);
     }
 

+ 10 - 0
src/main/java/com/dk/mdm/service/mst/RoleService.java

@@ -41,6 +41,16 @@ public class RoleService extends BaseService<Role> {
     private RoleConvert roleConvert;
 
     /**
+     * @desc : 重写主键
+     * @author : 周兴
+     * @date : 2024/2/29 20:29
+     */
+    @Override
+    public String getPrimaryKey() {
+        return "role_id";
+    }
+
+    /**
      * @desc : 查询角色
      * @author : 于继渤
      * @date : 2023/1/5 9:39