Commit 7ff3922c authored by shiyu's avatar shiyu

消息发送后保存记录的操作删除由回调执行

parent 7a1d8de7
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.wwdz.ch.core.consts.IMEnum; import com.wwdz.ch.core.consts.IMEnum;
import com.wwdz.ch.core.util.IMUtil;
import com.wwdz.ch.db.domain.ImRecord; import com.wwdz.ch.db.domain.ImRecord;
import com.wwdz.ch.wx.service.ImRecordService; import com.wwdz.ch.wx.service.ImRecordService;
import com.xxdxxs.utils.JsonUtils; import com.xxdxxs.utils.JsonUtils;
...@@ -31,6 +32,9 @@ public class IMCallbackController { ...@@ -31,6 +32,9 @@ public class IMCallbackController {
@Autowired @Autowired
ImRecordService imRecordService; ImRecordService imRecordService;
@Autowired
IMUtil imUtil;
/** /**
* OptPlatform,对应不同的平台类型,可能的取值有:RESTAPI(使用 REST API 发送请求) * OptPlatform,对应不同的平台类型,可能的取值有:RESTAPI(使用 REST API 发送请求)
* 、Web(使用 Web SDK 发送请求)、Android、iOS、Windows、Mac、iPad、Unknown(使用未知类型的设备发送请求) * 、Web(使用 Web SDK 发送请求)、Android、iOS、Windows、Mac、iPad、Unknown(使用未知类型的设备发送请求)
...@@ -74,8 +78,8 @@ public class IMCallbackController { ...@@ -74,8 +78,8 @@ public class IMCallbackController {
content = JsonUtils.getValueByPath(contentJsonStr, "Text"); content = JsonUtils.getValueByPath(contentJsonStr, "Text");
} }
imRecord.setFromAccount(fromAccount); imRecord.setFromAccount(imUtil.revertAppletUserId(fromAccount));
imRecord.setToAccount(toAccount); imRecord.setToAccount(imUtil.revertAppletUserId(toAccount));
imRecord.setMsgTime(new Date( msgTime)); imRecord.setMsgTime(new Date( msgTime));
imRecord.setMsgKey(msgKey); imRecord.setMsgKey(msgKey);
imRecord.setMsgType(IMEnum.MsgTypeEnum.getCodeByValue(msgType)); imRecord.setMsgType(IMEnum.MsgTypeEnum.getCodeByValue(msgType));
......
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