package com.younike.admin;

import com.younike.common.core.domain.AjaxResult;
import com.younike.system.service.IOperationIndexService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 运营后台管理首页数据统计
 * @Author dail
 * @Date 2022/2/10
 */
@Api("运营后台管理首页统计接口")
@RestController
@RequestMapping("/admin/operation")
public class AdminIndexController {

    @Autowired
    private IOperationIndexService operationIndexService;


    /**
     * 查询运营后台管理首页统计数据
     */
    @PreAuthorize("@ss.hasRole('operation')")
    @GetMapping("/getIndexStatisticsInfo")
    public AjaxResult getIndexStatisticsInfo() {
        return operationIndexService.getIndexStatisticsInfo();
    }

}
