| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwBuilding; |
| | | import com.doumee.dao.business.model.YwContractRoom; |
| | | import com.doumee.service.business.YwContractRoomService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | @PostMapping("/create") |
| | | @CloudRequiredPermission("business:ywcontractroom:create") |
| | | public ApiResponse create(@RequestBody YwContractRoom ywContractRoom,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywContractRoom.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywContractRoomService.create(ywContractRoom)); |
| | | } |
| | | |
| | |
| | | @GetMapping("/delete/{id}") |
| | | @CloudRequiredPermission("business:ywcontractroom:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywContractRoomService.deleteById(id); |
| | | ywContractRoomService.deleteById(id,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | ywContractRoomService.deleteByIdInBatch(idList); |
| | | ywContractRoomService.deleteByIdInBatch(idList,this.getLoginUser(token)); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | @PostMapping("/updateById") |
| | | @CloudRequiredPermission("business:ywcontractroom:update") |
| | | public ApiResponse updateById(@RequestBody YwContractRoom ywContractRoom,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | ywContractRoom.setLoginUserInfo(this.getLoginUser(token)); |
| | | ywContractRoomService.updateById(ywContractRoom); |
| | | return ApiResponse.success(null); |
| | | } |
| | |
| | | @PostMapping("/page") |
| | | @CloudRequiredPermission("business:ywcontractroom:query") |
| | | public ApiResponse<PageData<YwContractRoom>> findPage (@RequestBody PageWrap<YwContractRoom> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywContractRoomService.findPage(pageWrap)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/exportExcel") |
| | | @CloudRequiredPermission("business:ywcontractroom:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<YwContractRoom> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token)); |
| | | ExcelExporter.build(YwContractRoom.class).export(ywContractRoomService.findPage(pageWrap).getRecords(), "运维合同房源关联信息表", response); |
| | | } |
| | | |
| | | @ApiOperation("查询列表") |
| | | @PostMapping("/list") |
| | | @CloudRequiredPermission("business:ywcontractroom:query") |
| | | public ApiResponse<List<YwContractRoom>> findList (@RequestBody YwContractRoom pageWrap, @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | pageWrap.setLoginUserInfo(this.getLoginUser(token)); |
| | | return ApiResponse.success(ywContractRoomService.findList(pageWrap)); |
| | | } |
| | | @ApiOperation("根据ID查询") |
| | | @GetMapping("/{id}") |
| | | @CloudRequiredPermission("business:ywcontractroom:query") |