DeviceLpController.java 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package com.zy.omp.controller.wx;
  2. import com.zy.omp.common.ServerResponse;
  3. import com.zy.omp.model.DeviceLp;
  4. import com.zy.omp.service.DeviceLpService;
  5. import org.springframework.web.bind.annotation.GetMapping;
  6. import org.springframework.web.bind.annotation.PostMapping;
  7. import org.springframework.web.bind.annotation.RequestMapping;
  8. import org.springframework.web.bind.annotation.RestController;
  9. import javax.annotation.Resource;
  10. /**
  11. * 设备-路牌 前端控制器
  12. *
  13. * @author chenyi
  14. * @since 2021-06-12
  15. */
  16. @RestController
  17. @RequestMapping("/omp/api/wx/device/lp")
  18. public class DeviceLpController {
  19. @Resource
  20. private DeviceLpService deviceLpService;
  21. /**
  22. * 查询所有设备
  23. */
  24. @GetMapping("list.do")
  25. public ServerResponse getListByUserId() {
  26. return ServerResponse.createBySuccess(deviceLpService.list());
  27. }
  28. /**
  29. * 更新设备设置
  30. */
  31. @PostMapping("update.do")
  32. public ServerResponse update(DeviceLp deviceLp) {
  33. deviceLpService.updateParam(deviceLp);
  34. return ServerResponse.createBySuccess();
  35. }
  36. }