屏蔽史总跳舞指令
This commit is contained in:
parent
a063551a56
commit
7d17ebfd98
@ -43,12 +43,23 @@ public class U3DActionCommand extends ActionCommand implements IActionCommand{
|
||||
//数字人的id直接用用户id来代替
|
||||
if(U3dMsgTypeEnum.DANCE.getCode().equals(systemTalkBindU3d.getU3dType())){
|
||||
//推送客户端跳舞
|
||||
|
||||
BoxMessageResp resp = new BoxMessageResp();
|
||||
resp.setType(AskTypeEnum.U3D.getCode());
|
||||
resp.setText("开始跳舞");
|
||||
ActionResp actionResp = new ActionResp();
|
||||
actionResp.setType(7);
|
||||
resp.setAction(actionResp);
|
||||
if(baseSession.getUserId().equals(1291978L)){
|
||||
resp.setType(AskTypeEnum.TTS.getCode());
|
||||
resp.setText("抱歉,我还么学会跳舞");
|
||||
/*ActionResp actionResp = new ActionResp();
|
||||
actionResp.setType(7);
|
||||
resp.setAction(actionResp);*/
|
||||
}else{
|
||||
resp.setType(AskTypeEnum.U3D.getCode());
|
||||
resp.setText("开始跳舞");
|
||||
ActionResp actionResp = new ActionResp();
|
||||
actionResp.setType(7);
|
||||
resp.setAction(actionResp);
|
||||
}
|
||||
|
||||
|
||||
return baseWebSocketService.sendMessage(action, baseSession, resp);
|
||||
}else{
|
||||
//推送MQ换装
|
||||
|
||||
@ -11,9 +11,11 @@ import com.qiuguo.iot.base.utils.StringUtils;
|
||||
import com.qiuguo.iot.box.websocket.api.domain.box.BoxSession;
|
||||
import com.qiuguo.iot.box.websocket.api.service.BaseWebSocketService;
|
||||
import com.qiuguo.iot.box.websocket.api.service.WebsocketService;
|
||||
import com.qiuguo.iot.data.constants.YunxiRabbitConst;
|
||||
import com.qiuguo.iot.data.entity.device.DeviceInfoEntity;
|
||||
import com.qiuguo.iot.data.request.device.DeviceInfoRequest;
|
||||
import com.qiuguo.iot.data.service.device.DeviceInfoService;
|
||||
import com.qiuguo.iot.data.service.mq.MqService;
|
||||
import com.qiuguo.iot.data.service.system.SystemTalkAnswerConfigService;
|
||||
import com.qiuguo.iot.third.nlp.Nlp;
|
||||
import com.qiuguo.iot.third.service.LacNlpService;
|
||||
@ -63,6 +65,9 @@ public class WebsocketController {
|
||||
@Value("${Ali.accesskeySecret}")
|
||||
private String aliAccessSecret;
|
||||
|
||||
@Resource
|
||||
MqService mqService;
|
||||
|
||||
|
||||
@GetMapping("/push/message")
|
||||
public Mono<String> pushMessage(@RequestParam String message, @RequestParam String id, @RequestParam Integer type) {
|
||||
@ -83,6 +88,17 @@ public class WebsocketController {
|
||||
|
||||
}
|
||||
|
||||
@GetMapping("/mq/test")
|
||||
public Mono<String> sysTalkAnswer(@RequestParam String value) {
|
||||
return mqService.sendMessageWithConfirmation(YunxiRabbitConst.EXCHANGE_YUNXI_EVENT,
|
||||
"U3D.TO",
|
||||
value,
|
||||
2).flatMap(b -> {
|
||||
return Mono.just("测试MQ发送" + b);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@GetMapping("/test/nlp")
|
||||
public Mono<Nlp> nlp(@RequestParam String value, @RequestParam String type) {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user