Merge branch 'dev'
This commit is contained in:
commit
c59d6ca71c
|
@ -17,7 +17,6 @@ import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
import springfox.documentation.annotations.ApiIgnore;
|
||||||
|
@ -29,14 +28,14 @@ import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公告管理
|
* 公告管理
|
||||||
*
|
*
|
||||||
* @author dg 2498628697@qq.com
|
* @author dg 2498628697@qq.com
|
||||||
* @since 1.0 2022-12-01
|
* @since 1.0 2022-12-01
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sysnoticemanagement")
|
@RequestMapping("/sysnoticemanagement")
|
||||||
@Api(tags="公告管理")
|
@Api(tags = "公告管理")
|
||||||
public class SysNoticeManagementController {
|
public class SysNoticeManagementController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysNoticeManagementService sysNoticeManagementService;
|
private SysNoticeManagementService sysNoticeManagementService;
|
||||||
|
@ -44,15 +43,15 @@ public class SysNoticeManagementController {
|
||||||
@GetMapping("page")
|
@GetMapping("page")
|
||||||
@ApiOperation("分页")
|
@ApiOperation("分页")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
|
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
|
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||||
@ApiImplicitParam(name = "days", value = "公告显示周期", paramType = "query", dataType="int") ,
|
@ApiImplicitParam(name = "days", value = "公告显示周期", paramType = "query", dataType = "int"),
|
||||||
@ApiImplicitParam(name = "content", value = "公告内容", paramType = "query", dataType="int") ,
|
@ApiImplicitParam(name = "content", value = "公告内容", paramType = "query", dataType = "int"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
|
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
|
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String")
|
||||||
})
|
})
|
||||||
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:page")
|
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:page")
|
||||||
public Result<PageData<SysNoticeManagementDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
public Result<PageData<SysNoticeManagementDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||||
PageData<SysNoticeManagementDTO> page = sysNoticeManagementService.page(params);
|
PageData<SysNoticeManagementDTO> page = sysNoticeManagementService.page(params);
|
||||||
|
|
||||||
return new Result<PageData<SysNoticeManagementDTO>>().ok(page);
|
return new Result<PageData<SysNoticeManagementDTO>>().ok(page);
|
||||||
|
@ -61,7 +60,7 @@ public class SysNoticeManagementController {
|
||||||
@GetMapping("{id}")
|
@GetMapping("{id}")
|
||||||
@ApiOperation("信息")
|
@ApiOperation("信息")
|
||||||
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:info")
|
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:info")
|
||||||
public Result<SysNoticeManagementDTO> get(@PathVariable("id") Long id){
|
public Result<SysNoticeManagementDTO> get(@PathVariable("id") Long id) {
|
||||||
SysNoticeManagementDTO data = sysNoticeManagementService.get(id);
|
SysNoticeManagementDTO data = sysNoticeManagementService.get(id);
|
||||||
|
|
||||||
return new Result<SysNoticeManagementDTO>().ok(data);
|
return new Result<SysNoticeManagementDTO>().ok(data);
|
||||||
|
@ -71,7 +70,7 @@ public class SysNoticeManagementController {
|
||||||
@ApiOperation("保存")
|
@ApiOperation("保存")
|
||||||
@LogOperation("保存")
|
@LogOperation("保存")
|
||||||
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:save")
|
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:save")
|
||||||
public Result save(@RequestBody SysNoticeManagementDTO dto){
|
public Result save(@RequestBody SysNoticeManagementDTO dto) {
|
||||||
//效验数据
|
//效验数据
|
||||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||||
dto.setDelFlag(0);
|
dto.setDelFlag(0);
|
||||||
|
@ -81,11 +80,11 @@ public class SysNoticeManagementController {
|
||||||
return new Result();
|
return new Result();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping
|
@PostMapping(value = "/update")
|
||||||
@ApiOperation("修改")
|
@ApiOperation("修改")
|
||||||
@LogOperation("修改")
|
@LogOperation("修改")
|
||||||
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:update")
|
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:update")
|
||||||
public Result update(@RequestBody SysNoticeManagementDTO dto){
|
public Result update(@RequestBody SysNoticeManagementDTO dto) {
|
||||||
//效验数据
|
//效验数据
|
||||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||||
|
|
||||||
|
@ -98,7 +97,7 @@ public class SysNoticeManagementController {
|
||||||
@ApiOperation("删除")
|
@ApiOperation("删除")
|
||||||
@LogOperation("删除")
|
@LogOperation("删除")
|
||||||
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:delete")
|
//@RequiresPermissions("sysnoticemanagement:sysnoticemanagement:delete")
|
||||||
public Result delete(@RequestBody Long[] ids){
|
public Result delete(@RequestBody Long[] ids) {
|
||||||
//效验数据
|
//效验数据
|
||||||
AssertUtils.isArrayEmpty(ids, "id");
|
AssertUtils.isArrayEmpty(ids, "id");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue