|
|
|
@ -1,6 +1,7 @@
@@ -1,6 +1,7 @@
|
|
|
|
|
package com.cloud.kicc.commonbiz.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.map.MapUtil; |
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
@@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
|
import javax.validation.Valid; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.Map; |
|
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* <p> |
|
|
|
@ -56,7 +58,14 @@ public class PushChatMessageController {
@@ -56,7 +58,14 @@ public class PushChatMessageController {
|
|
|
|
|
@ApiOperation(value = "分页好友历史记录查询") |
|
|
|
|
public R listFriendHistoryMessage(Page page, PushChatMessage pushChatMessage) { |
|
|
|
|
IPage<Map<String, Object>> result = iPushChatMessageService.listFriendHistoryMessage(page, pushChatMessage); |
|
|
|
|
return R.ok(result.getRecords(), result.getTotal()); |
|
|
|
|
String cursor = result.getRecords() |
|
|
|
|
.stream() |
|
|
|
|
.findFirst() |
|
|
|
|
.map(record -> Objects.toString(record.get("createTime"), null)) |
|
|
|
|
.orElse(null); |
|
|
|
|
return R.ok(MapUtil.<String, Object>builder("cursor", cursor) |
|
|
|
|
.put("data", result.getRecords()) |
|
|
|
|
.build()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@GetMapping("/{id:\\w+}") |
|
|
|
|