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

import cn.wisenergy.common.utils.R;
import cn.wisenergy.service.app.DayTaskService;
import io.swagger.annotations.Api;
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("/day")
@Slf4j
public class DayTaskController {

    @Autowired
    private DayTaskService dayTaskService;

    @ApiOperation(value = "订单佣金", notes = "订单佣金", httpMethod = "GET")
    @GetMapping("/orderRebate")
    public R<Boolean> orderRebate() {
        return dayTaskService.orderRebate();
    }


    @ApiOperation(value = "月度肥料", notes = "月度肥料", httpMethod = "GET")
    @GetMapping("/monthManure")
    public R<Boolean> monthManure() {
        return dayTaskService.performanceCount();
    }

    @ApiOperation(value = "最大进步奖", notes = "最大进步奖", httpMethod = "GET")
    @GetMapping("/growAward")
    public R<Boolean> growAward() {
        return dayTaskService.progressPrizeCount();
    }
}
