wlzboy
6 天以前 09e6dc3fb7266620fafb5e341808a8eb36e080a1
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
package com.ruoyi.system.mapper;
 
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.system.domain.NotifySendLog;
 
/**
 * 通知发送记录Mapper接口
 * 
 * @author ruoyi
 * @date 2025-12-07
 */
public interface NotifySendLogMapper {
 
    /**
     * 查询通知发送记录
     * 
     * @param id 通知发送记录主键
     * @return 通知发送记录
     */
    NotifySendLog selectNotifySendLogById(Long id);
 
    /**
     * 查询通知发送记录列表
     * 
     * @param notifySendLog 通知发送记录
     * @return 通知发送记录集合
     */
    List<NotifySendLog> selectNotifySendLogList(NotifySendLog notifySendLog);
 
    /**
     * 检查是否已存在发送记录(防重检查)
     * 
     * @param taskId 任务ID
     * @param userId 用户ID
     * @param notifyType 通知类型
     * @param channel 通知渠道
     * @return 记录数量
     */
    int checkNotifySendLogExists(@Param("taskId") Long taskId, 
                                  @Param("userId") Long userId,
                                  @Param("notifyType") String notifyType,
                                  @Param("channel") String channel);
 
    /**
     * 根据任务ID和用户ID查询发送记录
     * 
     * @param taskId 任务ID
     * @param userId 用户ID
     * @param notifyType 通知类型
     * @param channel 通知渠道
     * @return 通知发送记录
     */
    NotifySendLog selectNotifySendLog(@Param("taskId") Long taskId,
                                       @Param("userId") Long userId,
                                       @Param("notifyType") String notifyType,
                                       @Param("channel") String channel);
 
    /**
     * 新增通知发送记录
     * 
     * @param notifySendLog 通知发送记录
     * @return 结果
     */
    int insertNotifySendLog(NotifySendLog notifySendLog);
 
    /**
     * 修改通知发送记录
     * 
     * @param notifySendLog 通知发送记录
     * @return 结果
     */
    int updateNotifySendLog(NotifySendLog notifySendLog);
 
    /**
     * 更新发送状态
     * 
     * @param id 记录ID
     * @param sendStatus 发送状态
     * @param sendResult 发送结果
     * @param sendContent 发送内容
     * @return 结果
     */
    int updateSendStatus(@Param("id") Long id,
                         @Param("sendStatus") String sendStatus,
                         @Param("sendResult") String sendResult,
                         @Param("sendContent") String sendContent);
 
    /**
     * 删除通知发送记录
     * 
     * @param id 通知发送记录主键
     * @return 结果
     */
    int deleteNotifySendLogById(Long id);
 
    /**
     * 批量删除通知发送记录
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int deleteNotifySendLogByIds(Long[] ids);
 
    /**
     * 查询待重试的失败记录
     * 
     * @param maxRetryCount 最大重试次数
     * @return 失败记录列表
     */
    List<NotifySendLog> selectFailedNotifySendLogs(@Param("maxRetryCount") Integer maxRetryCount);
}