Browse Source

feat: support Independence sso

master
wangxiang 1 year ago
parent
commit
8485579756
  1. 2
      kicc-platform/kicc-platform-biz/kicc-common-biz/src/main/java/com/cloud/kicc/commonbiz/controller/PushChatMessageController.java
  2. 6
      kicc-platform/kicc-platform-biz/kicc-common-biz/src/main/resources/mapper/PushChatMessageMapper.xml
  3. 2
      kicc-platform/kicc-platform-biz/kicc-system-biz/src/main/java/com/cloud/kicc/system/controller/ChatGptController.java
  4. 6
      kicc-platform/kicc-platform-biz/kicc-system-biz/src/main/resources/mapper/ImContentMapper.xml

2
kicc-platform/kicc-platform-biz/kicc-common-biz/src/main/java/com/cloud/kicc/commonbiz/controller/PushChatMessageController.java

@ -60,7 +60,7 @@ public class PushChatMessageController { @@ -60,7 +60,7 @@ public class PushChatMessageController {
IPage<Map<String, Object>> result = iPushChatMessageService.listFriendHistoryMessage(page, pushChatMessage);
String cursor = result.getRecords()
.stream()
.findFirst()
.reduce((first, second) -> second)
.map(record -> Objects.toString(record.get("createTime"), null))
.orElse(null);
return R.ok(MapUtil.<String, Object>builder("cursor", cursor)

6
kicc-platform/kicc-platform-biz/kicc-common-biz/src/main/resources/mapper/PushChatMessageMapper.xml

@ -38,10 +38,12 @@ @@ -38,10 +38,12 @@
<if test="ew.cursor != null and ew.cursor != ''">
and pm.create_time &lt; #{ew.cursor}
</if>
and (pm.user_id = #{ew.userId} and pm.alias = #{ew.alias})
and (
(pm.user_id = #{ew.userId} and pm.alias = #{ew.alias})
or (pm.user_id = #{ew.alias} and pm.alias = #{ew.userId})
)
</where>
order by pm.create_time asc
order by pm.create_time desc
</select>
</mapper>

2
kicc-platform/kicc-platform-biz/kicc-system-biz/src/main/java/com/cloud/kicc/system/controller/ChatGptController.java

@ -44,7 +44,7 @@ public class ChatGptController { @@ -44,7 +44,7 @@ public class ChatGptController {
IPage<Map<String, Object>> result = iImContentService.listHistoryMessage(page, imContent);
String cursor = result.getRecords()
.stream()
.findFirst()
.reduce((first, second) -> second)
.map(record -> Objects.toString(record.get("sendTime"), null))
.orElse(null);
return R.ok(MapUtil.<String, Object>builder("cursor", cursor)

6
kicc-platform/kicc-platform-biz/kicc-system-biz/src/main/resources/mapper/ImContentMapper.xml

@ -30,10 +30,12 @@ @@ -30,10 +30,12 @@
<if test="ew.cursor != null and ew.cursor != ''">
and im.send_time &lt; #{ew.cursor}
</if>
and (im.send_user_id = #{ew.sendUserId} and im.receive_user_id = #{ew.receiveUserId})
and (
(im.send_user_id = #{ew.sendUserId} and im.receive_user_id = #{ew.receiveUserId})
or (im.send_user_id = #{ew.receiveUserId} and im.receive_user_id = #{ew.sendUserId})
)
</where>
order by im.send_time asc
order by im.send_time desc
</select>
</mapper>

Loading…
Cancel
Save