|
|
@@ -1018,15 +1018,15 @@ public class DmIntentController extends BaseController<DmIntentQuery, DmIntentDt |
|
|
|
return AjaxResult.error(res); |
|
|
|
} |
|
|
|
|
|
|
|
@PostMapping("/api/testforwelcome") |
|
|
|
public AjaxResult test(){ |
|
|
|
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.getJSONArray("data").toJSONString()); |
|
|
|
} |
|
|
|
return AjaxResult.success(); |
|
|
|
} |
|
|
|
// @PostMapping("/api/testforwelcome") |
|
|
|
// public AjaxResult test(){ |
|
|
|
// 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.getJSONArray("data").toJSONString()); |
|
|
|
// } |
|
|
|
// return AjaxResult.success(); |
|
|
|
// } |
|
|
|
|
|
|
|
@PostMapping("/inner/generateContextTask") |
|
|
|
@ResponseBody |
|
|
|