package com.ruoyi.web.work.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.web.work.mapper.CommonMapper;
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;

/**
 * 后台首页统计
 */
@RestController
@RequestMapping("/home")
public class IndexController {

    @Autowired
    private CommonMapper mapper;


    @GetMapping("/index")
    public AjaxResult index() {
        AjaxResult result = new AjaxResult();
        result.put("count", mapper.admin());
        return AjaxResult.success(result);
    }
}
