|
@@ -1,8 +1,14 @@
|
|
|
package com.citu.module.menduner.im.service.wukong;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.citu.framework.common.pojo.CommonResult;
|
|
|
import com.citu.module.menduner.im.controller.app.base.wukong.ChannelMessageSyncReqVo;
|
|
|
+import com.citu.module.menduner.im.controller.app.base.wukong.HistoryMessagesReqVo;
|
|
|
+import com.citu.module.menduner.im.dal.dataobject.UserMsgDO;
|
|
|
+import com.citu.module.menduner.im.dal.mysql.UserMsgMapper;
|
|
|
import com.citu.module.menduner.im.service.UserService;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -13,6 +19,7 @@ public class WuKongMessageServiceImpl implements WuKongMessageService{
|
|
|
|
|
|
WuKongApiService wuKongApiService;
|
|
|
|
|
|
+ UserMsgMapper userMsgMapper;
|
|
|
|
|
|
|
|
|
@Override
|
|
@@ -22,6 +29,22 @@ public class WuKongMessageServiceImpl implements WuKongMessageService{
|
|
|
return CommonResult.success(wuKongApiService.channelMessageSync(reqVo));
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public CommonResult historyMessages(HistoryMessagesReqVo reqVo) {
|
|
|
+ Page page = reqVo.getPage();
|
|
|
+ userMsgMapper.selectPage(page,new LambdaQueryWrapper<UserMsgDO>()
|
|
|
+ .eq(null!=reqVo.getType(),UserMsgDO::getType,reqVo.getType())
|
|
|
+ .eq(StringUtils.isNotBlank(reqVo.getFromUid()),UserMsgDO::getFromUid,reqVo.getFromUid())
|
|
|
+ .eq(StringUtils.isNotBlank(reqVo.getChannelId()),UserMsgDO::getChannelId,reqVo.getChannelId()));
|
|
|
+
|
|
|
+ return CommonResult.success(page);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ public void setUserMsgMapper(UserMsgMapper userMsgMapper) {
|
|
|
+ this.userMsgMapper = userMsgMapper;
|
|
|
+ }
|
|
|
+
|
|
|
@Autowired
|
|
|
public void setWuKongApiService(WuKongApiService wuKongApiService) {
|
|
|
this.wuKongApiService = wuKongApiService;
|