From ddd8e926760bd3aa4132a119e528ca3fe6778dda Mon Sep 17 00:00:00 2001 From: p87sjbg3f <1239676507@qq.com> Date: Fri, 28 Jun 2024 20:27:30 +0800 Subject: [PATCH] ADD file via upload --- StatisticsController.java | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 StatisticsController.java diff --git a/StatisticsController.java b/StatisticsController.java new file mode 100644 index 0000000..6207049 --- /dev/null +++ b/StatisticsController.java @@ -0,0 +1,32 @@ +package com.qsd.orange.controller; + +import com.qsd.orange.dao.StatisticsDao; +import com.qsd.orange.global.R; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("statistics") +public class StatisticsController { + + @Autowired + private StatisticsDao statisticsDao; + + @GetMapping("region") + public R region(){ + return R.success().data("items", statisticsDao.getRegionVo()); + } + + @GetMapping("salesman/{year}") + public R salesman(@PathVariable("year") String year){ + return R.success().data("items", statisticsDao.getSalesman(year)); + } + @GetMapping("company/{year}") + public R company(@PathVariable("year") String year){ + return R.success().data("items", statisticsDao.getCompany(year)); + } + +}