package org.dromara.web.controller;

import cn.dev33.satoken.annotation.SaIgnore;
import com.wzj.soopin.order.service.OrderService;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.core.utils.SpringUtils;
import org.dromara.common.core.utils.StringUtils;
import org.dromara.web.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 首页
 *
 * @author Lion Li
 */
@SaIgnore
@RequiredArgsConstructor
@RestController
public class IndexController {


    private final IndexService indexService;

    /**
     * 访问首页，提示语
     */
    @GetMapping("/")
    public String index() {
        return StringUtils.format("欢迎使用{}后台管理框架，请通过前端地址访问。", SpringUtils.getApplicationName());
    }


    /**
     * 获取数量统计
     */

    @GetMapping("/count")
    public R getCount() {
        return R.ok(indexService.getCount());
    }

    /**
     * 获取今日待办任务
     */

    /**
     * 获取流量概括
     */
    /**
     * 获取今日概括
     */

}
