Commit fa8ab204 authored by shiyu's avatar shiyu

ai会话

parent 887dc4e9
...@@ -37,13 +37,14 @@ public class IMCallbackController { ...@@ -37,13 +37,14 @@ public class IMCallbackController {
public Object getCallbackInfo(@RequestParam(required = false, name = "SdkAppid") String sdkAppid, public Object getCallbackInfo(@RequestParam(required = false, name = "SdkAppid") String sdkAppid,
@RequestParam(required = false, name = "OptPlatform") String optPlatform, @RequestParam(required = false, name = "OptPlatform") String optPlatform,
@RequestParam(required = false, name = "CallbackCommand") String callbackCommand, @RequestParam(required = false, name = "CallbackCommand") String callbackCommand,
@RequestBody(required = false) String jsonStr) { @RequestBody(required = false) JSONObject jsonObject) {
try { try {
logger.info("消息发送之后的回调url参数 -> SdkAppid: {}, OptPlatform:{}, CallbackCommand:{}", sdkAppid, optPlatform, callbackCommand); logger.info("消息发送之后的回调url参数 -> SdkAppid: {}, OptPlatform:{}, CallbackCommand:{}", sdkAppid, optPlatform, callbackCommand);
if (!sdkAppid.equals(String.valueOf(SDKAppID))) { if (!sdkAppid.equals(String.valueOf(SDKAppID))) {
logger.info(">>>>>>>>>>> IM回调sdkappid 不一致 <<<<<<<<<<<"); logger.info(">>>>>>>>>>> IM回调sdkappid 不一致 <<<<<<<<<<<");
return false; return false;
} }
String jsonStr = JsonUtils.from(jsonObject);
logger.info("消息发送之后的回调推送原文 -> {}", jsonStr); logger.info("消息发送之后的回调推送原文 -> {}", jsonStr);
ImRecord imRecord = new ImRecord(); ImRecord imRecord = new ImRecord();
//发送消息后回调信息处理 //发送消息后回调信息处理
......
...@@ -167,7 +167,7 @@ public class ImServiceImpl implements IMService { ...@@ -167,7 +167,7 @@ public class ImServiceImpl implements IMService {
ImRecord answerImRecord = new ImRecord(); ImRecord answerImRecord = new ImRecord();
answerImRecord.setFromAccount(dto.getToAccount()); answerImRecord.setFromAccount(dto.getToAccount());
answerImRecord.setToAccount(dto.getFromAccount()); answerImRecord.setToAccount(dto.getFromAccount());
imRecord.setMsgKey(answerResult.getData()); answerImRecord.setMsgKey(answerResult.getData());
answerImRecord.setMsgType(IMEnum.MsgTypeEnum.TIMTextElem.getCode()); answerImRecord.setMsgType(IMEnum.MsgTypeEnum.TIMTextElem.getCode());
answerImRecord.setMsgContent(answer); answerImRecord.setMsgContent(answer);
answerImRecord.setOnlineOnlyFlag(0); answerImRecord.setOnlineOnlyFlag(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment