package com.easyproject.web.controller.home;

import com.easyproject.common.core.domain.AjaxResult;
import com.easyproject.system.service.home.IIndexService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 方法说明: 首页数据统计
 * @param
 * @return
 * @author java-101
 * @date 2025-04-11 12:37:20
 */
@Slf4j
@RestController
@RequestMapping("/system/index")
public class IndexController {

    @Resource
    private IIndexService indexService;

    /**
     * 方法说明: 首页-顶部统计
     * @param
     * @return
     * @author java-101
     * @date 2025-04-11 12:39:54
     */
    @GetMapping("/getTotalInfo")
    public AjaxResult getTotalInfo() {
        return indexService.getTotalInfo();
    }

    /**
     * 方法说明: 首页-查询访问量（近15天）
     * @param
     * @return
     * @author java-101
     * @date 2025-04-11 12:40:57
     */
    @GetMapping("/getPageViewTotalList")
    public AjaxResult getPageViewTotalList() {
        return indexService.getPageViewTotalList();
    }
}
