package com.kym.admin.controller; import com.kym.common.R; import com.kym.common.controller.IController; import com.kym.service.StatService; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * 统计数据 */ @RestController @RequestMapping("/stat") public class StatController extends IController { private final StatService statService; public StatController(StatService statService) { this.statService = statService; } @PostMapping("/dashboard") public R dashboard() { return R.success(statService.dashboard()); } }