浏览代码

修改:

1、修改招呼语生成方式。(整体流程完成)
dev-welcome
10710 1年前
父节点
当前提交
ea4206ad2d
共有 2 个文件被更改,包括 10 次插入10 次删除
  1. +9
    -9
      xueyi-modules/xueyi-nlt/src/main/java/com/xueyi/nlt/nlt/controller/DmIntentController.java
  2. +1
    -1
      xueyi-modules/xueyi-nlt/src/main/java/com/xueyi/nlt/nlt/template/GenerativeWelcomeTemplate.java

+ 9
- 9
xueyi-modules/xueyi-nlt/src/main/java/com/xueyi/nlt/nlt/controller/DmIntentController.java 查看文件

@@ -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


+ 1
- 1
xueyi-modules/xueyi-nlt/src/main/java/com/xueyi/nlt/nlt/template/GenerativeWelcomeTemplate.java 查看文件

@@ -65,7 +65,7 @@ public class GenerativeWelcomeTemplate implements BaseTemplate{

JSONObject peopleType = new JSONObject();
peopleType.put("employee", "员工");
peopleType.put("employer", "领导");
peopleType.put("employer", "老板");
peopleType.put("visitor", "访客");

String holiday = "";


正在加载...
取消
保存