package com.m2pool.lease.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.m2pool.lease.mq.message.RabbitmqOrderMessage;
import com.m2pool.lease.entity.LeasePaymentRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 支付记录表 Mapper 接口
 * </p>
 *
 * @author yyb
 * @since 2025-07-23
 */
@Mapper
public interface LeasePaymentRecordMapper extends BaseMapper<LeasePaymentRecord> {

    /**
     * 检查订单支付状态
     *
     * @param message
     * @return
     */
    List<LeasePaymentRecord> checkPaymentRecordStatus(@Param("list") List<RabbitmqOrderMessage> message);

    /**
     * 批量更新订单支付状态
     *
     * @param list
     * @return
     */
    int updateBatchStatusForOderIdAndShopId(@Param("list") List<LeasePaymentRecord> list);


    /**
     * 查询最近15分钟处于支付中的订单
     * @return
     */
    List<LeasePaymentRecord> getIsPayInData();




}
