|
|
|
@@ -965,7 +965,7 @@ public class DmIntentController extends BaseController<DmIntentQuery, DmIntentDt |
|
|
|
JSONObject jo = generativeWelcomeTemplate.handle("1", ""); |
|
|
|
Map<Object, Object> devices = redisTemplate2.opsForHash().entries("group:dgman:device:"); |
|
|
|
for(Object devId:devices.keySet()){ |
|
|
|
mqttTemplate.sendToMqtt("/" + activeProfile + "/" + "digital_man" + "/" + devId.toString() + "/" + "notify" + "/" + "generate-welcome", jo.toJSONString()); |
|
|
|
mqttTemplate.sendToMqtt("/" + activeProfile + "/" + "digital_man" + "/" + devId.toString() + "/" + "notify" + "/" + "generate-welcome", AjaxResult.success(jo.getJSONArray("data")).toString()); |
|
|
|
} |
|
|
|
return AjaxResult.success(); |
|
|
|
} |
|
|
|
@@ -981,7 +981,7 @@ public class DmIntentController extends BaseController<DmIntentQuery, DmIntentDt |
|
|
|
JSONObject jo = generativeWelcomeTemplate.handle("1", ""); |
|
|
|
Map<Object, Object> devices = redisTemplate2.opsForHash().entries("group:dgman:device:"); |
|
|
|
for(Object devId:devices.keySet()){ |
|
|
|
mqttTemplate.sendToMqtt("/" + activeProfile + "/" + "digital_man" + "/" + devId.toString() + "/" + "notify" + "/" + "generate-welcome", jo.toJSONString()); |
|
|
|
mqttTemplate.sendToMqtt("/" + activeProfile + "/" + "digital_man" + "/" + devId.toString() + "/" + "notify" + "/" + "generate-welcome", AjaxResult.success(jo.getJSONArray("data")).toString()); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("生成任务失败:{}",e.getMessage()); |
|
|
|
|