|  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.system.dto.QuerySystemPermissionDTO; | 
|---|
|  |  |  | import com.doumee.dao.system.model.SystemPermission; | 
|---|
|  |  |  | import com.doumee.dao.system.vo.SystemPermissionListVO; | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("新建") | 
|---|
|  |  |  | @PostMapping("/create") | 
|---|
|  |  |  | @RequiresPermissions("system:permission:create") | 
|---|
|  |  |  | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemPermission systemPermission) { | 
|---|
|  |  |  | public ApiResponse create(@Validated(OperaType.Create.class)@RequestBody SystemPermission systemPermission, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | systemPermission.setCreateUser(this.getLoginUser(token).getId()); | 
|---|
|  |  |  | return ApiResponse.success(systemPermissionBiz.create(systemPermission)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiOperation("修改") | 
|---|
|  |  |  | @PostMapping("/updateById") | 
|---|
|  |  |  | @RequiresPermissions("system:permission:update") | 
|---|
|  |  |  | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemPermission systemPermission) { | 
|---|
|  |  |  | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemPermission systemPermission, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { | 
|---|
|  |  |  | systemPermission.setUpdateUser(this.getLoginUser(token).getId()); | 
|---|
|  |  |  | systemPermissionBiz.updateById(systemPermission); | 
|---|
|  |  |  | return ApiResponse.success(null); | 
|---|
|  |  |  | } | 
|---|