Commit 9f84ab0b authored by shiyu's avatar shiyu

消息自定义字段

parent 276fd97f
...@@ -11,6 +11,7 @@ import com.wwdz.ch.db.dto.request.ImRecordRequestDto; ...@@ -11,6 +11,7 @@ import com.wwdz.ch.db.dto.request.ImRecordRequestDto;
import com.wwdz.ch.db.dto.request.UserRequestDto; import com.wwdz.ch.db.dto.request.UserRequestDto;
import com.xxdxxs.utils.StringUtils; import com.xxdxxs.utils.StringUtils;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -31,7 +32,7 @@ public class SysIMController { ...@@ -31,7 +32,7 @@ public class SysIMController {
@Autowired @Autowired
SysIMService sysIMService; SysIMService sysIMService;
// @RequiresPermissions("admin:sysIM:sendChatMsg")
@ApiOperation(value = "人工介入ai发送聊天消息") @ApiOperation(value = "人工介入ai发送聊天消息")
@PostMapping("/sendChatMsg") @PostMapping("/sendChatMsg")
public Result sendChatMsg(@RequestBody SendChatMsgRequestDto dto) { public Result sendChatMsg(@RequestBody SendChatMsgRequestDto dto) {
......
...@@ -71,7 +71,12 @@ public class IMCallbackController { ...@@ -71,7 +71,12 @@ public class IMCallbackController {
String onlineOnlyFlag = JsonUtils.getValueByPath(jsonStr, "OnlineOnlyFlag"); String onlineOnlyFlag = JsonUtils.getValueByPath(jsonStr, "OnlineOnlyFlag");
String sendMsgResult = JsonUtils.getValueByPath(jsonStr, "SendMsgResult"); String sendMsgResult = JsonUtils.getValueByPath(jsonStr, "SendMsgResult");
String errorInfo = JsonUtils.getValueByPath(jsonStr, "ErrorInfo"); String errorInfo = JsonUtils.getValueByPath(jsonStr, "ErrorInfo");
String cloudCustomData = JsonUtils.getValueByPath(jsonStr, "CloudCustomData"); String cloudCustomData = null;
try {
cloudCustomData = JsonUtils.getValueByPath(jsonStr, "CloudCustomData");
} catch (Exception e) {
}
if (!"0".equals(sendMsgResult)) { if (!"0".equals(sendMsgResult)) {
logger.error("msgKey:{}, 消息下发失败错误信息:{}", msgKey, errorInfo); logger.error("msgKey:{}, 消息下发失败错误信息:{}", msgKey, errorInfo);
imRecord.setState(IMEnum.MsgStateEnum.FAILED.getCode()); imRecord.setState(IMEnum.MsgStateEnum.FAILED.getCode());
......
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