package com.xy.controller;

import com.xy.dto.DeviceSimChargeDto;
import com.xy.service.DeviceSimChargeServiceImpl;
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.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Service
@AllArgsConstructor
@Api(tags = "小程序-设备流量卡充值表")
public class DeviceSimChargeController {

    private DeviceSimChargeServiceImpl deviceSimChargeService;

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