Commit 9f84ab0b authored by shiyu's avatar shiyu

消息自定义字段

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