| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.db.gen.entity.RoleManagementEntity; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IRoleManagementService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | |
| | | { |
| | | return getDataTable("分页不能为空"); |
| | | } |
| | | |
| | | if(pageSize==null) |
| | | { |
| | | return getDataTable("分页条数不能为空"); |
| | |
| | | @ApiOperation("新增角色") |
| | | @PostMapping("/add") |
| | | @Authorization |
| | | public ResultData insertConfig(@RequestBody RoleManagementEntity entity) |
| | | public ResultData insertConfig(@RequestBody RoleManagementEntity entity, @CurrentUser SysUser sysUser) |
| | | { |
| | | // entity.setCreateUserId(sysUser.getUserId()+""); |
| | | entity.setCreateUserId(sysUser.getUserId()+""); |
| | | return toAjax(iRoleManagementService.insertConfig(entity)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("编辑角色") |
| | | @PostMapping("/update") |
| | | @Authorization |
| | | public ResultData updateConfig(@RequestBody RoleManagementEntity entity) |
| | | public ResultData updateConfig(@RequestBody RoleManagementEntity entity,@CurrentUser SysUser sysUser) |
| | | { |
| | | // entity.setUpdateUserId(sysUser.getUserId()+""); |
| | | entity.setUpdateUserId(sysUser.getUserId()+""); |
| | | return toAjax(iRoleManagementService.updateConfig(entity)); |
| | | } |
| | | |