Browse Source

修改:

1、修复bug,将返回值变为JSONObject
tags/B.2.7.0_20240201_base
10710 1 year ago
parent
commit
844d09e3e0
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      xueyi-modules/xueyi-nlt/src/main/java/com/xueyi/nlt/nlt/controller/DmIntentController.java

+ 2
- 2
xueyi-modules/xueyi-nlt/src/main/java/com/xueyi/nlt/nlt/controller/DmIntentController.java View File

@@ -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());


Loading…
Cancel
Save