SetInfoController.java 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. package com.zy.omp.controller.wx;
  2. import com.zy.omp.common.ServerResponse;
  3. import com.zy.omp.common.controller.BaseController;
  4. import com.zy.omp.pojo.io.CallRecordsIO;
  5. import com.zy.omp.pojo.io.NewsIO;
  6. import com.zy.omp.service.CallRecordsService;
  7. import com.zy.omp.service.DeviceSetService;
  8. import com.zy.omp.service.NewsService;
  9. import org.springframework.web.bind.annotation.GetMapping;
  10. import org.springframework.web.bind.annotation.RequestMapping;
  11. import org.springframework.web.bind.annotation.RestController;
  12. import javax.annotation.Resource;
  13. /**
  14. * 获取设备设置相关接口
  15. *
  16. * @author yang xiao kun
  17. * create on 2021/1/21
  18. */
  19. @RestController
  20. @RequestMapping("omp/api/wx/setInfo")
  21. public class SetInfoController extends BaseController {
  22. @Resource
  23. private DeviceSetService deviceSetService;
  24. @Resource
  25. private CallRecordsService callRecordsService;
  26. @Resource
  27. private NewsService setNewsService;
  28. /**
  29. * 查询设备的音量设置
  30. * 系统音量,通话音量,铃声音量
  31. *
  32. * @param deviceId 设备ID
  33. */
  34. @GetMapping("volume.do")
  35. public ServerResponse volume(String deviceId) {
  36. return ServerResponse.createBySuccess(deviceSetService.getVolumeSet(deviceId));
  37. }
  38. /**
  39. * 查询设备的其他设置
  40. * 自动接听,定位频率,连续定位设置
  41. *
  42. * @param deviceId 设备ID
  43. */
  44. @GetMapping("other.do")
  45. public ServerResponse other(String deviceId) {
  46. return ServerResponse.createBySuccess(deviceSetService.getOtherSet(deviceId));
  47. }
  48. /**
  49. * 获取SOS按键设置
  50. *
  51. * @param deviceId 设备ID
  52. */
  53. @GetMapping("sos.do")
  54. public ServerResponse sos(String deviceId) {
  55. return ServerResponse.createBySuccess(deviceSetService.getSosSet(deviceId));
  56. }
  57. /**
  58. * 获取通话记录
  59. */
  60. @GetMapping("callRecords.do")
  61. public ServerResponse callRecords(CallRecordsIO io) {
  62. return ServerResponse.createBySuccess(callRecordsService.getListPage(io));
  63. }
  64. /**
  65. * 获取播报记录
  66. */
  67. @GetMapping("news.do")
  68. public ServerResponse news(NewsIO io) {
  69. return ServerResponse.createBySuccess(setNewsService.getListPage(io));
  70. }
  71. }