HomePageController.java 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. package com.caimei.modules.shiro.controller;
  2. import com.caimei.modules.shiro.service.HomePageService;
  3. import com.caimei.utils.JsonModel;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.web.bind.annotation.RequestMapping;
  6. import org.springframework.web.bind.annotation.RestController;
  7. import java.util.Map;
  8. @RestController
  9. @RequestMapping("homepage")
  10. public class HomePageController {
  11. @Autowired
  12. private HomePageService homePageService;
  13. /**
  14. * 收款金额统计
  15. */
  16. @RequestMapping("receivable")
  17. public JsonModel receivableAmount(String endTime, String startTime) {
  18. Map<String, Object> map = homePageService.receivableAmount(endTime, startTime);
  19. return JsonModel.newInstance().success(map);
  20. }
  21. /**
  22. * 订单总量统计
  23. */
  24. @RequestMapping("order")
  25. public JsonModel orderQuantity(String endTime, String startTime) {
  26. Map<String, Object> map = homePageService.orderQuantity(endTime, startTime);
  27. return JsonModel.newInstance().success(map);
  28. }
  29. }