jiangping
2024-11-19 edf4f6e763580e9d3a65524d4b2094051f7018fb
server/visits/dmvisit_admin/src/main/java/com/doumee/cloud/admin/YwRoomCloudController.java
@@ -36,6 +36,7 @@
    @PostMapping("/create")
    @CloudRequiredPermission("business:ywroom:create")
    public ApiResponse create(@RequestBody YwRoom ywRoom,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
        ywRoom.setLoginUserInfo(this.getLoginUser(token));
        return ApiResponse.success(ywRoomService.create(ywRoom));
    }
@@ -43,7 +44,7 @@
    @GetMapping("/delete/{id}")
    @CloudRequiredPermission("business:ywroom:delete")
    public ApiResponse deleteById(@PathVariable Integer id,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
        ywRoomService.deleteById(id);
        ywRoomService.deleteById(id,this.getLoginUser(token));
        return ApiResponse.success(null);
    }
@@ -56,7 +57,7 @@
        for (String id : idArray) {
            idList.add(Integer.valueOf(id));
        }
        ywRoomService.deleteByIdInBatch(idList);
        ywRoomService.deleteByIdInBatch(idList,this.getLoginUser(token));
        return ApiResponse.success(null);
    }
@@ -64,6 +65,7 @@
    @PostMapping("/updateById")
    @CloudRequiredPermission("business:ywroom:update")
    public ApiResponse updateById(@RequestBody YwRoom ywRoom,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
        ywRoom.setLoginUserInfo(this.getLoginUser(token));
        ywRoomService.updateById(ywRoom);
        return ApiResponse.success(null);
    }
@@ -72,6 +74,7 @@
    @PostMapping("/page")
    @CloudRequiredPermission("business:ywroom:query")
    public ApiResponse<PageData<YwRoom>> findPage (@RequestBody PageWrap<YwRoom> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
        pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token));
        return ApiResponse.success(ywRoomService.findPage(pageWrap));
    }
@@ -79,6 +82,7 @@
    @PostMapping("/exportExcel")
    @CloudRequiredPermission("business:ywroom:exportExcel")
    public void exportExcel (@RequestBody PageWrap<YwRoom> pageWrap, HttpServletResponse response,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) {
        pageWrap.getModel().setLoginUserInfo(this.getLoginUser(token));
        ExcelExporter.build(YwRoom.class).export(ywRoomService.findPage(pageWrap).getRecords(), "运维房源信息表", response);
    }