package com.ruoyi.mall.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.mall.service.IndexDataService;
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;

/**
 * 首页数据
 *
 * @author ruoyi
 * @date 2021-12-17
 */
@RestController
@RequestMapping("/mall/indexData")
public class IndexDataController {

    @Resource
    private IndexDataService indexDataService;

    /**
     * 首页头部数据
     * @return
     */
    @GetMapping("/indexTabData")
    public AjaxResult indexTabData(){
        return indexDataService.indexTabData();
    }

    /**
     * 折线图数据
     * @return
     */
    @GetMapping("/indexLineChartData")
    public AjaxResult indexLineChartData(){
        return indexDataService.indexLineChartData();
    }

}
