package com.zy.omp.controller.wx; import com.zy.omp.common.ServerResponse; import com.zy.omp.model.DeviceLp; import com.zy.omp.service.DeviceLpService; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; /** * 设备-路牌 前端控制器 * * @author chenyi * @since 2021-06-12 */ @RestController @RequestMapping("/omp/api/wx/device/lp") public class DeviceLpController { @Resource private DeviceLpService deviceLpService; /** * 查询所有设备 */ @GetMapping("list.do") public ServerResponse getListByUserId() { return ServerResponse.createBySuccess(deviceLpService.list()); } /** * 更新设备设置 */ @PostMapping("update.do") public ServerResponse update(DeviceLp deviceLp) { deviceLpService.updateParam(deviceLp); return ServerResponse.createBySuccess(); } }