package com.gyee.runeconomy.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gyee.runeconomy.dto.R;
import com.gyee.runeconomy.dto.ResultMsg;
import com.gyee.runeconomy.model.auto.ProEconPowerstationInfoDay1;
import com.gyee.runeconomy.service.auto.IProEconPowerstationInfoDay1Service;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 场站五损电量 前端控制器
 * </p>
 *
 * @author wang
 * @since 2022-11-21
 */
@RestController
@RequestMapping("//pro-econ-powerstation-info-day1")
public class ProEconPowerstationInfoDay1Controller {


    @Resource
    private IProEconPowerstationInfoDay1Service proEconPowerstationInfoDay1Service;

    /**
     * 查询
     *
     * @param pageNum
     * @param pageSize
     * @return
     */
    @GetMapping(value = "/listByPage")
    @ApiOperation(value = "省公司-列表", notes = "省公司-列表")
    public R findList(@RequestParam(value = "pageNum", required = true) String pageNum,
                      @RequestParam(value = "pageSize", required = true) String pageSize) {
        IPage<ProEconPowerstationInfoDay1> list = proEconPowerstationInfoDay1Service.list(pageNum, pageSize);
        if (null != list) {
            return R.data(ResultMsg.ok(list));
        } else {
            return R.error(ResultMsg.error());
        }
    }

}
