|
@@ -13,7 +13,6 @@ import com.xy.collections.map.JMap;
|
|
|
import com.xy.dto.*;
|
|
|
import com.xy.entity.DeviceInfo;
|
|
|
import com.xy.entity.MqttCommand;
|
|
|
-import com.xy.enums.LogEnum;
|
|
|
import com.xy.mapper.MqttCommandMapper;
|
|
|
import com.xy.service.factory.cmd.CmdService;
|
|
|
import com.xy.service.factory.device.DeviceFactory;
|
|
@@ -125,7 +124,13 @@ public class MqttServiceImpl extends ServiceImpl<MqttCommandMapper, MqttCommand>
|
|
|
list.addAll(data);
|
|
|
}
|
|
|
});
|
|
|
- return R.ok(list).setLogMsg(JSONUtil.parseArray(jMap.getValues()).toString());
|
|
|
+ JList<JList<CommandMqtt>> values = jMap.getValues();
|
|
|
+ values.forEach(value -> value.forEach(commandMqtt -> {
|
|
|
+ JSONObject templet = commandMqtt.getTemplet();
|
|
|
+ templet.set("search", String.format("%s_%s", commandMqtt.getDeviceId(), templet.getJSONObject("data").getStr("type")));
|
|
|
+ commandMqtt.setTemplet(templet);
|
|
|
+ }));
|
|
|
+ return R.ok(list).setLogMsg(JSONUtil.parseArray(values).toString());
|
|
|
}
|
|
|
|
|
|
@ApiOperation("指令Ack")
|