| | |
| | | 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.QuerySystemDictDTO; |
| | | import com.doumee.dao.system.model.SystemDict; |
| | | import com.doumee.dao.system.vo.SystemDictListVO; |
| | |
| | | @ApiOperation("新建") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("system:dict:create") |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemDict systemDict) { |
| | | public ApiResponse create(@Validated(OperaType.Create.class) @RequestBody SystemDict systemDict, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | systemDict.setCreateUser(this.getLoginUser(token).getId()); |
| | | return ApiResponse.success(systemDictBiz.create(systemDict)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("修改") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("system:dict:update") |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemDict systemDict) { |
| | | public ApiResponse updateById(@Validated(OperaType.Update.class) @RequestBody SystemDict systemDict, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | systemDict.setUpdateUser(this.getLoginUser(token).getId()); |
| | | systemDictBiz.updateById(systemDict); |
| | | return ApiResponse.success(null); |
| | | } |