package com.xinyilu.web.controller.homePage;

import com.xinyilu.common.core.controller.BaseController;
import com.xinyilu.common.core.domain.AjaxResult;
import com.xinyilu.system.service.homePage.HomePageService;
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 wanghao
 * @create 2023/9/8 0008
 */
@RestController
@RequestMapping("/system/homePage")
public class HomePageController extends BaseController {
    @Autowired
    private HomePageService homePageService;

    /**
     * 查询幼儿园/班级/学生数量
     */
    @GetMapping("/getBaseData")
    public AjaxResult getBaseData() {
        return AjaxResult.success(homePageService.getBaseData());
    }

    /**
     * 小程序统计-个人/幼儿园
     */
    @GetMapping("/getAppletDataInfo")
    public AjaxResult getAppletDataInfo() {
        return AjaxResult.success(homePageService.getAppletDataInfo());
    }
}
