wlzboy
7 小时以前 5f2ee03958a1a16dc27195c76ea7cffb422c95d1
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
package com.ruoyi.system.service;
 
import java.util.List;
import com.ruoyi.system.domain.NotifySendLog;
 
/**
 * 通知发送记录服务接口
 * 
 * @author ruoyi
 * @date 2025-12-07
 */
public interface INotifySendLogService {
 
    /**
     * 查询通知发送记录
     * 
     * @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 true=已发送过, false=未发送过
     */
    boolean hasNotified(Long taskId, Long userId, String notifyType, String channel);
 
    /**
     * 尝试创建发送记录(防重,如果已存在则返回false)
     * 
     * @param taskId 任务ID
     * @param userId 用户ID
     * @param userName 用户姓名
     * @param notifyType 通知类型
     * @param channel 通知渠道
     * @return 创建的记录,如果已存在则返回null
     */
    NotifySendLog tryCreateSendLog(Long taskId, Long userId, String userName, 
                                    String notifyType, String channel);
 
    /**
     * 更新发送状态为成功
     * 
     * @param id 记录ID
     * @param result 发送结果信息
     * @param content 发送内容
     */
    void markSendSuccess(Long id, String result, String content);
 
    /**
     * 更新发送状态为成功(向后兼容)
     * 
     * @param id 记录ID
     * @param result 发送结果信息
     */
    void markSendSuccess(Long id, String result);
 
    /**
     * 更新发送状态为失败
     * 
     * @param id 记录ID
     * @param errorMsg 错误信息
     * @param content 发送内容
     */
    void markSendFailed(Long id, String errorMsg, String content);
 
    /**
     * 更新发送状态为失败(向后兼容)
     * 
     * @param id 记录ID
     * @param errorMsg 错误信息
     */
    void markSendFailed(Long id, String errorMsg);
 
    /**
     * 新增通知发送记录
     * 
     * @param notifySendLog 通知发送记录
     * @return 结果
     */
    int insertNotifySendLog(NotifySendLog notifySendLog);
 
    /**
     * 修改通知发送记录
     * 
     * @param notifySendLog 通知发送记录
     * @return 结果
     */
    int updateNotifySendLog(NotifySendLog notifySendLog);
 
    /**
     * 批量删除通知发送记录
     * 
     * @param ids 需要删除的通知发送记录主键集合
     * @return 结果
     */
    int deleteNotifySendLogByIds(Long[] ids);
 
    /**
     * 删除通知发送记录信息
     * 
     * @param id 通知发送记录主键
     * @return 结果
     */
    int deleteNotifySendLogById(Long id);
 
    /**
     * 根据任务ID和用户ID查询发送记录
     * 
     * @param taskId 任务ID
     * @param userId 用户ID
     * @param notifyType 通知类型
     * @param channel 通知渠道
     * @return 通知发送记录
     */
    NotifySendLog selectNotifySendLog(Long taskId, Long userId, String notifyType, String channel);
    /**
     * 查询待重试的失败记录
     * 
     * @param maxRetryCount 最大重试次数
     * @return 失败记录列表
     */
}