mapper
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.cnbm.basic.controller;
|
||||
|
||||
import com.cnbm.admin.annotation.LogOperation;
|
||||
import com.cnbm.admin.params.IdParam;
|
||||
import com.cnbm.common.constant.Constant;
|
||||
import com.cnbm.common.page.PageData;
|
||||
import com.cnbm.common.utils.ExcelUtils;
|
||||
@@ -46,7 +47,8 @@ public class UnitController {
|
||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) ,
|
||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) ,
|
||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) ,
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class)
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class),
|
||||
@ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class)
|
||||
})
|
||||
//@PreAuthorize("@ex.hasAuthority('code:unit:page')")
|
||||
public Result<PageData<UnitDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
@@ -66,7 +68,7 @@ public class UnitController {
|
||||
|
||||
@PostMapping
|
||||
@ApiOperation("保存")
|
||||
@LogOperation("保存")
|
||||
//@LogOperation("保存")
|
||||
//@PreAuthorize("@ex.hasAuthority('code:unit:save')")
|
||||
public Result save(@RequestBody UnitDTO dto){
|
||||
//效验数据
|
||||
@@ -79,7 +81,7 @@ public class UnitController {
|
||||
|
||||
@PutMapping
|
||||
@ApiOperation("修改")
|
||||
@LogOperation("修改")
|
||||
//@LogOperation("修改")
|
||||
//@PreAuthorize("@ex.hasAuthority('code:unit:update')")
|
||||
public Result update(@RequestBody UnitDTO dto){
|
||||
//效验数据
|
||||
@@ -92,7 +94,7 @@ public class UnitController {
|
||||
|
||||
@DeleteMapping
|
||||
@ApiOperation("删除")
|
||||
@LogOperation("删除")
|
||||
//@LogOperation("删除")
|
||||
//@PreAuthorize("@ex.hasAuthority('code:unit:delete')")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
@@ -105,7 +107,7 @@ public class UnitController {
|
||||
|
||||
@GetMapping("export")
|
||||
@ApiOperation("导出")
|
||||
@LogOperation("导出")
|
||||
//@LogOperation("导出")
|
||||
//@PreAuthorize("@ex.hasAuthority('code:unit:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<UnitDTO> list = unitService.list(params);
|
||||
@@ -113,11 +115,11 @@ public class UnitController {
|
||||
ExcelUtils.exportExcelToTarget(response, null, list, UnitExcel.class);
|
||||
}
|
||||
|
||||
@GetMapping("status")
|
||||
@PostMapping("status")
|
||||
@ApiOperation("改变状态")
|
||||
@LogOperation("改变状态")
|
||||
public Result changeStatus(@PathVariable("id") Long id){
|
||||
unitService.changeStatus(id);
|
||||
//@LogOperation("改变状态")
|
||||
public Result changeStatus(@RequestBody IdParam id){
|
||||
unitService.changeStatus(id.getId());
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user