package com.wzj.soopin.order.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wzj.soopin.order.domain.entity.RedPacketReceive;
import org.apache.ibatis.annotations.Select;

public interface RedPacketReceiveMapper extends BaseMapper<RedPacketReceive> {

    @Select("SELECT COUNT(1) FROM oms_red_packet_receive " +
        "WHERE packet_id = #{packetId} " +
        "AND receiver_id = #{memberId} ")
    Integer checkReceived(Long packetId, Long memberId);
}
