package com.ruoyi.web.controller.doumu;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.service.IDoumuProductInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system/statistics")
public class StatisticsController {

    @Autowired
    private IDoumuProductInfoService doumuProductInfoService;

    /**
     * pc首页各环节数量统计
     */
    @PreAuthorize("@ss.hasPermi('system:statistics:link')")
    @GetMapping(value = "/link")
    public AjaxResult link(String dateType)
    {
        return doumuProductInfoService.link(dateType);
    }

    /**
     * pc首页本月各环节进度情况
     */
    @PreAuthorize("@ss.hasPermi('system:statistics:monthLink')")
    @GetMapping(value = "/monthLink")
    public AjaxResult monthLink()
    {
        return doumuProductInfoService.monthLink();
    }
}
