|
|
@@ -1,6 +1,8 @@
|
|
|
package com.cyksj.web.controller.manage.corp;
|
|
|
|
|
|
+import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
import com.cyksj.dto.Result;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.model.entity.QyMsgContent;
|
|
|
@@ -23,6 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.HashSet;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -89,7 +92,12 @@ public class CorpMsgAuditController {
|
|
|
*/
|
|
|
@GetMapping("/getMsgByFollowIdAndUserId")
|
|
|
public Result<SearchResult<QyMsgContent>> getMsgByFollowIdAndUserId(){
|
|
|
- SearchResult<QyMsgContent> search = beanSearcher.search(QyMsgContent.class, MapUtils.flatBuilder(request.getParameterMap()).build());
|
|
|
+ Map<String, Object> build = MapUtils.flatBuilder(request.getParameterMap()).build();
|
|
|
+ log.info("获取聊天记录 param:{}", JSONUtil.toJsonStr(build));
|
|
|
+ if (!build.containsKey("followId") || !build.containsKey("externalUserid")){
|
|
|
+ throw BusinessRuntimeException.getInstance("缺少必填参数.");
|
|
|
+ }
|
|
|
+ SearchResult<QyMsgContent> search = beanSearcher.search(QyMsgContent.class, build);
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
}
|
|
|
|