package cn.wisenergy.web.admin.controller.app;

import cn.wisenergy.common.utils.R;
import cn.wisenergy.model.app.ProgressPrize;
import cn.wisenergy.model.dto.ProgressPrizeQuery;
import cn.wisenergy.service.app.ProgressPrizeService;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 86187
 */
@Api(tags = "后台管理--进步奖")
@RestController
@RequestMapping("/admin/prize")
@Slf4j
public class PrizeController {
    @Autowired
    private ProgressPrizeService prizeService;


    @ApiOperation(value = "获取最大进步奖列表", notes = "获取最大进步奖列表", httpMethod = "GET")
    @ApiImplicitParam(name = "query", value = "查询参数", dataType = "ProgressPrizeQuery")
    @GetMapping("/getList")
    public R<PageInfo<ProgressPrize>> getList(ProgressPrizeQuery query) {
        log.info("shop-mall[]MonthAwardController[]getList[]input.param.query:" + query);
        if (null == query) {
            return R.error("入参为空!");
        }
        return prizeService.getList(query);
    }
}
