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);
|
}
|