package org.dromara.rfid.controller;

import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.web.core.BaseController;
import org.dromara.rfid.domain.vo.HomeStatsVO;
import org.dromara.rfid.service.IStatisticsService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页统计接口
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/rfid/statistics")
public class StatisticsController extends BaseController {

    private final IStatisticsService statisticsService;

    /**
     * 获取首页统计数据
     */
    @GetMapping("/home")
    public R<HomeStatsVO> getHomeStats() {
        return R.ok(statisticsService.getHomeStats());
    }
}
