提交 b2570b11 authored 作者: linzhenjie's avatar linzhenjie

增加窗帘正反接口

上级 d9d84c43
......@@ -443,6 +443,26 @@ public class ShDeviceController {
return R.ok();
}
@Login
@PostMapping("curtainTrackController")
@ApiOperation("窗帘轨道控制")
@ApiLog("窗帘轨道控制")
public R curtainTrackController(@RequestBody Map<String, Object> params) {
String mac = (String) params.get("mac");
Integer direction = (Integer) params.get("direction");
if(StringUtils.isBlank(mac, direction)) {
return R.error("缺少参数");
}
ProtocolContent protocol = new ProtocolContent();
protocol.setReceiveId(mac);
protocol.setContent(ByteUtils.int2Hex(direction) + "000000");
protocol.setDeviceType("05");
protocol.setCmd("19");
mqProducer.sendT(JSON.toJSONString(protocol));
return R.ok();
}
@Login
@PostMapping("airerController")
@ApiOperation("晾衣架控制")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论