package com.docus.server.message.mapper;

import com.docus.server.message.entity.DelayedMessages;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 延迟消息 mapper
 * @author wyb
 */
@Mapper
public interface DelayedMessagesMapper {

    int delById(@Param("id") Long id);

    int updateById(@Param("message") DelayedMessages message);

    int insert(@Param("message") DelayedMessages message);

    List<DelayedMessages> findExecutableMessages(@Param("condition") DelayedMessages condition,@Param("currentDateTime") String formatCurrentDateTime);

    DelayedMessages findMessage(@Param("condition") DelayedMessages condition);
}
