管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-08 e7b3a5e891287b1291d2ac38f7c83d5d73bc7906
src/main/java/com/lf/server/controller/sys/ResController.java
ÎļþÃû´Ó src/main/java/com/lf/server/controller/data/ResController.java ÐÞ¸Ä
@@ -1,10 +1,10 @@
package com.lf.server.controller.data;
package com.lf.server.controller.sys;
import com.lf.server.controller.BaseController;
import com.lf.server.aspect.SysLog;
import com.lf.server.controller.all.BaseController;
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.data.DictEntity;
import com.lf.server.entity.data.ResEntity;
import com.lf.server.service.data.ResService;
import com.lf.server.entity.sys.ResEntity;
import com.lf.server.service.sys.ResService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -19,13 +19,14 @@
 * @author SWS
 * @date 2022-09.28
 */
@Api(tags = "资源表")
@Api(tags = "运维管理\\资源管理")
@RestController
@RequestMapping("/res")
public class ResController  extends BaseController {
    @Autowired
    ResService resService;
    @SysLog()
    @ApiOperation(value = "查询记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", required = false, example = "sys_res")
@@ -41,6 +42,7 @@
        }
    }
    @SysLog()
    @ApiOperation(value = "分页查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = "sys_res"),
@@ -62,6 +64,7 @@
        }
    }
    @SysLog()
    @ApiOperation(value = "分页查询并返回记录数")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "query", example = "sys_res"),
@@ -85,9 +88,11 @@
            return fail(ex.getMessage(), null);
        }
    }
    @SysLog()
    @ApiOperation(value = "插入字典")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "resEntity", value = "字典实体类", dataType = "com.lf.server.entity.data.ResEntity", paramType = "body", example = "")
            @ApiImplicitParam(name = "resEntity", value = "字典实体类", dataType = "com.lf.server.entity.sys.ResEntity", paramType = "body", example = "")
    })
    @PostMapping(value = "/insertRes", produces = "application/json; charset=UTF-8")
    public ResponseMsg<Integer> insertRes(@RequestBody ResEntity resEntity) {
@@ -100,6 +105,7 @@
        }
    }
    @SysLog()
    @ApiOperation(value = "插入多条字典")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "resEntity", value = "字典实体类集合", dataType = "List<ResEntity>", paramType = "body", example = "")
@@ -115,6 +121,7 @@
        }
    }
    @SysLog()
    @ApiOperation(value = "删除一条字典")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "字典ID", dataType = "Integer", paramType = "query", example = "1")
@@ -130,6 +137,7 @@
        }
    }
    @SysLog()
    @ApiOperation(value = "删除多条字典")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ids", value = "字典ID集合", dataType = "List<Integer>", paramType = "query", example = "1,2")
@@ -147,6 +155,7 @@
        }
    }
    @SysLog()
    @ApiOperation(value = "更新一条字典")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "resEntity", value = "字典ID集合", dataType = "ResEntity", paramType = "body", example = "")
@@ -163,6 +172,7 @@
        }
    }
    @SysLog()
    @ApiOperation(value = "根据ID查询字典")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "字典ID", dataType = "Integer", paramType = "query", example = "1")
@@ -178,6 +188,7 @@
        }
    }
    @SysLog()
    @ApiOperation(value = "查询所有字典")
    @GetMapping(value = "/selectResAll")
    public ResponseMsg<List<ResEntity>> selectResAll() {
@@ -189,9 +200,4 @@
            return fail(ex.getMessage(), null);
        }
    }
}