DataController.java 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. package com.fdkankan.manage.controller;
  2. import com.fdkankan.common.response.ResultData;
  3. import com.fdkankan.manage.service.IDataService;
  4. import com.fdkankan.manage.service.ISysRoleService;
  5. import org.springframework.beans.factory.annotation.Autowired;
  6. import org.springframework.web.bind.annotation.GetMapping;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RequestParam;
  9. import org.springframework.web.bind.annotation.RestController;
  10. /**
  11. * 统计分析
  12. */
  13. @RestController
  14. @RequestMapping("/service/manage/data")
  15. public class DataController {
  16. @Autowired
  17. IDataService dataService;
  18. @Autowired
  19. ISysRoleService sysRoleService;
  20. /**
  21. *统计新增用户数
  22. * @param type 0:日 ,1:月,2:年
  23. */
  24. @GetMapping("/user")
  25. public ResultData userData(@RequestParam(required = false,defaultValue = "0") Integer type){
  26. return ResultData.ok(dataService.userData(type));
  27. }
  28. /**
  29. *统计相机数据
  30. */
  31. @GetMapping("/camera")
  32. public ResultData camera(){
  33. return ResultData.ok(dataService.cameraData());
  34. }
  35. /**
  36. *统计权益订单
  37. * @param type 0:日 ,1:月,2:年
  38. */
  39. @GetMapping("/increment")
  40. public ResultData incrementData(@RequestParam(required = false,defaultValue = "0") Integer type){
  41. return ResultData.ok(dataService.incrementData(type));
  42. }
  43. /**
  44. *统计下载订单
  45. * @param type 0:日 ,1:月,2:年
  46. */
  47. @GetMapping("/down")
  48. public ResultData downData(@RequestParam(required = false,defaultValue = "0") Integer type){
  49. return ResultData.ok(dataService.downData(type));
  50. }
  51. /**
  52. *统计场景数量订单
  53. * @param type 0:日 ,1:月,2:年
  54. * @param cameraType 0 看看,1看见,2深时
  55. */
  56. @GetMapping("/sceneNum")
  57. public ResultData sceneNum(@RequestParam(required = false,defaultValue = "0") Integer type,
  58. @RequestParam(required = false,defaultValue = "0") Integer cameraType){
  59. return ResultData.ok(dataService.sceneNum(type,cameraType));
  60. }
  61. }