聊天会话记录
This commit is contained in:
@@ -9,9 +9,7 @@ import com.lld.im.service.group.model.req.ImportGroupReq;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
@@ -43,12 +41,8 @@ public class ConversationController {
|
||||
}
|
||||
|
||||
@RequestMapping("/syncConversationList")
|
||||
public ResponseVO syncFriendShipList(@RequestBody @Validated SyncReq req, Integer appId) {
|
||||
public ResponseVO syncFriendShipList(@RequestBody @Validated SyncReq req,Integer appId) {
|
||||
req.setAppId(appId);
|
||||
log.info("&&&&&&&&&&&&&&&&&&&&&&&&&&&");
|
||||
log.info(req.toString());
|
||||
log.info(appId.toString());
|
||||
log.info("&&&&&&&&&&&&&&&&&&&&&&&&&&&");
|
||||
return conversationService.syncConversationSet(req);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.lld.im.service.friendship.dao.ImFriendShipEntity;
|
||||
import com.lld.im.service.seq.RedisSeq;
|
||||
import com.lld.im.service.utils.MessageProducer;
|
||||
import com.lld.im.service.utils.WriteUserSeq;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -33,6 +34,7 @@ import java.util.List;
|
||||
* @author: lld
|
||||
* @version: 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ConversationService {
|
||||
|
||||
@@ -178,6 +180,12 @@ public class ConversationService {
|
||||
queryWrapper.eq("app_id",req.getAppId());
|
||||
queryWrapper.last(" limit " + req.getMaxLimit());
|
||||
queryWrapper.orderByAsc("sequence");
|
||||
|
||||
log.info("============================= syncConversationSet ========================");
|
||||
log.info("============================= syncConversationSet ========================");
|
||||
log.info("============================= syncConversationSet ========================");
|
||||
log.info(req.toString());
|
||||
|
||||
List<ImConversationSetEntity> list = imConversationSetMapper
|
||||
.selectList(queryWrapper);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.lld.im.service.friendship.controller;
|
||||
|
||||
import com.lld.im.common.ResponseVO;
|
||||
import com.lld.im.common.model.SyncReq;
|
||||
import com.lld.im.service.friendship.model.req.*;
|
||||
import com.lld.im.service.friendship.service.ImFriendService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -85,5 +86,11 @@ public class ImFriendShipController {
|
||||
return imFriendShipService.checkBlck(req);
|
||||
}
|
||||
|
||||
@RequestMapping("/syncFriendshipList")
|
||||
public ResponseVO syncFriendshipList(@RequestBody @Validated
|
||||
SyncReq req, Integer appId){
|
||||
req.setAppId(appId);
|
||||
return imFriendShipService.syncFriendshipList(req);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
package com.lld.im.service.interceptor;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lld.im.common.BaseErrorCode;
|
||||
import com.lld.im.common.ResponseVO;
|
||||
import com.lld.im.common.enums.GateWayErrorCode;
|
||||
import com.lld.im.common.exception.ApplicationExceptionEnum;
|
||||
import com.lld.im.common.model.RequestBase;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -13,7 +15,10 @@ import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.xml.ws.RequestWrapper;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.Enumeration;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
@@ -34,9 +39,7 @@ public class GateWayInterceptor implements HandlerInterceptor {
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
|
||||
// if (1 == 1){
|
||||
// return true;
|
||||
// }
|
||||
|
||||
|
||||
//获取appId 操作人 userSign
|
||||
String appIdStr = request.getParameter("appId");
|
||||
@@ -71,6 +74,7 @@ public class GateWayInterceptor implements HandlerInterceptor {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.lld.im.service.interceptor;
|
||||
|
||||
/**
|
||||
* @author: Chackylee
|
||||
* @author: rowger
|
||||
* @description:
|
||||
**/
|
||||
public class RequestHolder {
|
||||
|
||||
Reference in New Issue
Block a user