This commit is contained in:
2022-12-15 20:25:31 +08:00
parent 02d1fadaff
commit 37547f908f

View File

@@ -12,6 +12,7 @@ import org.nl.common.domain.query.PageQuery;
import org.nl.modules.logging.annotation.Log; import org.nl.modules.logging.annotation.Log;
import org.nl.system.service.role.ISysRoleService; import org.nl.system.service.role.ISysRoleService;
import org.nl.system.service.role.dao.SysRole; import org.nl.system.service.role.dao.SysRole;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@@ -35,7 +36,7 @@ public class SysRoleController {
@ApiOperation("分页查询角色") @ApiOperation("分页查询角色")
@GetMapping @GetMapping
@SaCheckPermission("roles:list") @SaCheckPermission("roles:list")
public ResponseEntity<Object> pageQuery(@RequestParam Map param, PageQuery page) { public ResponseEntity<Object> pageQuery(@RequestParam Map param, Pageable page) {
return new ResponseEntity<>(roleService.query(param, page), HttpStatus.OK); return new ResponseEntity<>(roleService.query(param, page), HttpStatus.OK);
} }
@@ -47,5 +48,14 @@ public class SysRoleController {
roleService.create(param); roleService.create(param);
return new ResponseEntity<>(HttpStatus.CREATED); return new ResponseEntity<>(HttpStatus.CREATED);
} }
@Log("修改角色")
@ApiOperation("修改角色")
@PutMapping
// @SaCheckPermission("roles:edit")
public ResponseEntity<Object> update(@RequestBody JSONObject param) {
roleService.update(param);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
} }