洪城义警-正式版后台
zengh
2021-06-22 b762ec2dd9db7ebcf222b0621cd3c1671f9f451c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
package org.springblade.modules.chatrecords.service.impl;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springblade.modules.chatrecords.entity.ChatRecords;
import org.springblade.modules.chatrecords.mapper.ChatRecordsMapper;
import org.springblade.modules.chatrecords.service.ChatRecordsService;
import org.springblade.modules.chatrecords.vo.ChatRecordsVo;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
/**
 * @author zhongrj
 */
@Service
public class ChatRecordsServiceImpl extends ServiceImpl<ChatRecordsMapper, ChatRecords> implements ChatRecordsService {
 
    /**
     * 查询聊天消息分页信息
     * @param page
     * @param chatRecords 聊天消息对象
     * @return
     */
    @Override
    public IPage<ChatRecords> selectChatRecordsPage(IPage<ChatRecords> page, ChatRecords chatRecords) {
        return page.setRecords(baseMapper.selectChatRecordsPage(page,chatRecords));
    }
 
    /**
     * 查询当前用户的聊天列表
     * @param chatRecords 消息记录对象
     * @param page
     * @return
     */
    @Override
    public IPage<ChatRecordsVo> getChatListPage(IPage<ChatRecordsVo> page, ChatRecords chatRecords) {
        return page.setRecords(baseMapper.getChatListPage(page,chatRecords));
    }
 
    /**
     * 查询当前用户的聊天列表(不分页)
     * @param chatRecords 消息记录对象
     * @return
     */
    @Override
    public List<ChatRecordsVo> getChatList(ChatRecords chatRecords) {
        return baseMapper.getChatListPage(null,chatRecords);
    }
 
    /**
     * 查询单聊消息记录 (不分页)
     * @param chatRecords 消息记录对象
     * @return
     */
    @Override
    public List<ChatRecords> selectChatlist(ChatRecords chatRecords) {
        return baseMapper.selectChatRecordsPage(null,chatRecords);
    }
}