package com.xy.controller;

import com.xy.annotate.RestMappingController;
import com.xy.dto.DeviceChargingDto;
import com.xy.service.DeviceChargingServiceImpl;
import com.xy.utils.MercAuthUtils;
import com.xy.utils.PageBean;
import com.xy.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@AllArgsConstructor
@Api(tags = "小程序-设备计费表")
@RestMappingController("merc-mini/device-charging")
public class DeviceChargingController {

    private DeviceChargingServiceImpl deviceChargingService;

    @PostMapping("page")
    @ApiOperation("分页查询")
    public R<PageBean<DeviceChargingDto.PageVo>> page(@RequestBody DeviceChargingDto.Page page) {
        return deviceChargingService.page(page.setMercId(MercAuthUtils.getMercId()));
    }


}
