| | |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:hiddendanger:create") |
| | | public ApiResponse create(@RequestBody HiddenDanger hiddenDanger,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | LoginUserInfo loginUserInfo = getLoginUser(token); |
| | | hiddenDanger.setCreator(loginUserInfo.getId()); |
| | | hiddenDanger.setMemberId(loginUserInfo.getMemberId()); |
| | | hiddenDanger.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(hiddenDangerService.create(hiddenDanger)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:hiddendanger:update") |
| | | public ApiResponse updateById(@RequestBody HiddenDanger hiddenDanger,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | hiddenDanger.setLoginUserInfo(this.getLoginUser(token)); |
| | | hiddenDangerService.updateById(hiddenDanger); |
| | | return ApiResponse.success(null); |
| | | } |