DeviceController.java 1022 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package com.bizmatics.controller.web;
  2. import com.bizmatics.common.core.bean.ApiResult;
  3. import com.bizmatics.service.AlarmPowerService;
  4. import com.bizmatics.service.DeviceService;
  5. import com.bizmatics.service.vo.ApCountVO;
  6. import com.bizmatics.service.vo.SiteCountVO;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.web.bind.annotation.RequestMapping;
  9. import org.springframework.stereotype.Controller;
  10. import org.springframework.web.bind.annotation.RestController;
  11. import java.util.Date;
  12. /**
  13. * 设备
  14. *
  15. * @author ya
  16. * @since 2021-07-07
  17. */
  18. @RestController
  19. @RequestMapping("/device")
  20. public class DeviceController {
  21. @Autowired
  22. private DeviceService deviceService;
  23. /**
  24. * 查询设备总数
  25. * @param startTime
  26. * @param endTime
  27. * @return
  28. */
  29. @RequestMapping("/count")
  30. public ApiResult<SiteCountVO> count(Date startTime, Date endTime){
  31. return ApiResult.success(deviceService.selectDeviceCount(startTime,endTime));
  32. }
  33. }