xiangpei
2025-04-18 0aa739db8268b442ab74634289ffed00124a976a
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
61
package com.monkeylessey.mapper;
 
import com.monkeylessey.domain.entity.Session;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
import java.util.Date;
import java.util.List;
 
import com.monkeylessey.domain.query.SessionQuery;
import com.monkeylessey.domain.vo.SessionVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
/**
 * chat对话 Mapper 接口
 *
 * @author 向培
 * @since 2025-04-18
 */
@Mapper
public interface SessionMapper extends BaseMapper<Session> {
 
    /**
     * id查找chat对话
     * @param id
     * @return
     */
    SessionVO getById(Integer id);
 
    /**
    *  分页
    */
    IPage getPage(IPage page, @Param("query") SessionQuery query);
 
    /**
     * 今天的会话列表
     *
     * @param dayStart
     * @param dayEnd
     * @return
     */
    List<SessionVO> getTodaySessionList(@Param("dayStart") Date dayStart, @Param("dayEnd") Date dayEnd);
 
    /**
     * 昨天的会话
     *
     * @param dayStart
     * @param dayEnd
     * @return
     */
    List<SessionVO> getYesterdaySessionList(@Param("dayStart") Date dayStart, @Param("dayEnd") Date dayEnd);
 
    /**
     * 昨天之前的所有会话
     *
     * @param time
     * @return
     */
    List<SessionVO> getOldSessionList(@Param("time") Date time);
}