소스 검색

fix群默认头像

Eric 1 년 전
부모
커밋
918a6daec3
2개의 변경된 파일118개의 추가작업 그리고 160개의 파일을 삭제
  1. 114 159
      .idea/httpRequests/http-requests-log.http
  2. 4 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImGroupServiceImpl.java

+ 114 - 159
.idea/httpRequests/http-requests-log.http

@@ -1,3 +1,117 @@
+POST http://127.0.0.1:8805/api-web/imGroup/schoolQueryGroupList
+Content-Type: application/json
+Authorization: bearer e8ee451d-dffb-49e9-ad5c-67d7054ac4a1
+Content-Length: 2
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8.1)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{}
+
+<> 2023-10-24T173303.200.json
+
+###
+
+POST http://127.0.0.1:8805/api-web/imGroup/schoolQueryGroupList
+Content-Type: application/json
+Authorization: bearer e8ee451d-dffb-49e9-ad5c-67d7054ac4a1
+Content-Length: 2
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8.1)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{}
+
+<> 2023-10-24T173011.200.json
+
+###
+
+POST http://127.0.0.1:8805/api-web/imGroup/schoolQueryGroupList
+Content-Type: application/json
+Authorization: bearer e8ee451d-dffb-49e9-ad5c-67d7054ac4a1
+Content-Length: 2
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8.1)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{}
+
+<> 2023-10-24T172651.200.json
+
+###
+
+POST http://127.0.0.1:8805/api-web/imGroup/schoolQueryGroupList
+Content-Type: application/json
+Authorization: bearer e8ee451d-dffb-49e9-ad5c-67d7054ac4a1
+Content-Length: 2
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8.1)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{}
+
+<> 2023-10-24T172524.200.json
+
+###
+
+POST http://127.0.0.1:8805/api-web/imGroup/schoolQueryGroupList
+Authorization: bearer e8ee451d-dffb-49e9-ad5c-67d7054ac4a1
+Content-Length: 2
+Content-Type: */*; charset=UTF-8
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8.1)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{}
+
+<> 2023-10-24T172509.200.json
+
+###
+
+POST http://127.0.0.1:8805/api-web/imGroup/schoolQueryGroupList
+Authorization: bearer e8ee451d-dffb-49e9-ad5c-67d7054ac4a1
+Content-Length: 0
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8.1)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-10-24T172442.200.json
+
+###
+
+POST http://127.0.0.1:8805/api-web/imGroup/schoolQueryGroupList
+Authorization: bearer e8ee451d-dffb-49e9-ad5c-67d7054ac4a1
+Content-Length: 0
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8.1)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-10-24T172436.200.json
+
+###
+
+POST http://127.0.0.1:8805/api-web/imGroup/schoolQueryGroupList
+Authorization: bearer e8ee451d-dffb-49e9-ad5c-67d7054ac4a1
+Content-Length: 0
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8.1)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-10-24T172415.200.json
+
+###
+
+POST http://127.0.0.1:8805/api-web/imGroup/schoolQueryGroupList
+Authorization: bearer e8ee451d-dffb-49e9-ad5c-67d7054ac4a1
+Content-Length: 0
+Proxy-Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.8.1)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+<> 2023-10-24T172344.200.json
+
+###
+
 POST http://127.0.0.1:8805/api-web/imHistoryMessage/historyMessage
 Authorization: bearer f63411e7-63e0-48e4-bbfa-40413b97b744
 Content-Type: application/json
@@ -733,162 +847,3 @@ Accept-Encoding: br,deflate,gzip,x-gzip
 
 ###
 
-POST http://127.0.0.1:8805/api-web/imHistoryMessage/historyMessage
-Authorization: bearer 3526591a-a4e9-488c-82f1-4a1e56a0c6a4
-Content-Type: application/json
-Content-Length: 48
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "page": 1,
-  "rows": 10,
-  "keyword": "30"
-}
-
-<> 2023-10-23T113536.200.json
-
-###
-
-POST http://127.0.0.1:8805/api-web/imHistoryMessage/historyMessage
-Authorization: bearer 3526591a-a4e9-488c-82f1-4a1e56a0c6a4
-Content-Type: application/json
-Content-Length: 48
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "page": 1,
-  "rows": 10,
-  "keyword": "30"
-}
-
-<> 2023-10-23T113344.200.json
-
-###
-
-POST http://127.0.0.1:8805/api-web/imHistoryMessage/historyMessage
-Authorization: bearer 3526591a-a4e9-488c-82f1-4a1e56a0c6a4
-Content-Type: application/json
-Content-Length: 48
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "page": 1,
-  "rows": 10,
-  "keyword": "30"
-}
-
-<> 2023-10-23T113203.200.json
-
-###
-
-POST http://127.0.0.1:8805/api-web/imHistoryMessage/historyMessage
-Authorization: bearer 3526591a-a4e9-488c-82f1-4a1e56a0c6a4
-Content-Type: application/json
-Content-Length: 47
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "page": 1,
-  "rows": 10,
-  "keyword": "3"
-}
-
-<> 2023-10-23T113151.200.json
-
-###
-
-POST http://127.0.0.1:8805/api-web/imHistoryMessage/historyMessage
-Authorization: bearer 3526591a-a4e9-488c-82f1-4a1e56a0c6a4
-Content-Type: application/json
-Content-Length: 48
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "page": 1,
-  "rows": 10,
-  "keyword": "11"
-}
-
-<> 2023-10-23T113146.200.json
-
-###
-
-POST http://127.0.0.1:8805/api-web/imHistoryMessage/historyMessage
-Authorization: bearer 3526591a-a4e9-488c-82f1-4a1e56a0c6a4
-Content-Type: application/json
-Content-Length: 50
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "page": 1,
-  "rows": 10,
-  "keyword": "11"
-}
-
-<> 2023-10-23T113119.200.json
-
-###
-
-POST http://127.0.0.1:8805/api-web/imHistoryMessage/historyMessage
-Authorization: bearer 3526591a-a4e9-488c-82f1-4a1e56a0c6a4
-Content-Type: application/json
-Content-Length: 29
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "page": 1,
-  "rows": 10
-}
-
-<> 2023-10-23T113105.200.json
-
-###
-
-POST http://127.0.0.1:8805/api-web/imHistoryMessage/historyMessage
-Authorization: bearer 3526591a-a4e9-488c-82f1-4a1e56a0c6a4
-Content-Type: application/json
-Content-Length: 30
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "page": 50,
-  "rows": 10
-}
-
-<> 2023-10-23T113056.200.json
-
-###
-
-POST http://127.0.0.1:8805/api-web/imHistoryMessage/historyMessage
-Authorization: bearer 3526591a-a4e9-488c-82f1-4a1e56a0c6a4
-Content-Type: application/json
-Content-Length: 29
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "page": 1,
-  "rows": 10
-}
-
-<> 2023-10-23T113032.200.json
-
-###
-

+ 4 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ImGroupServiceImpl.java

@@ -772,7 +772,10 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
      */
     @Override
     public List<ImGroup> queryByUserId(ImGroupWrapper.ImQuery query) {
-        List<ImGroup> imGroups = imGroupDao.getByUserId(query);
+        List<ImGroup> imGroups = imGroupDao.getByUserId(query).stream()
+            .filter(Objects::nonNull).collect(Collectors.toList());
+
+        // 群默认头像
         for (ImGroup item : imGroups) {
             if (Objects.nonNull(item.getGroupType()) && StringUtils.isBlank(item.getImg())) {
                 item.setImg(item.getGroupType().getAvatar());