package com.jsowell.pile.mapper;


import com.jsowell.pile.domain.WxpayCallbackRecord;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

public interface WxpayCallbackRecordMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(WxpayCallbackRecord record);

    int insertSelective(WxpayCallbackRecord record);

    WxpayCallbackRecord selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(WxpayCallbackRecord record);

    int updateByPrimaryKey(WxpayCallbackRecord record);

    /**
     * 通过订单号查询支付记录
     * @param orderCode
     * @return
     */
	WxpayCallbackRecord selectByOrderCode(String orderCode);

    /**
     * 根据会员id和时间查询支付记录
     * @param memberId 会员id
     * @param date 日期，查询该日期之后的记录
     * @return
     */
    List<WxpayCallbackRecord> selectBalanceRechargeRecord(@Param("memberId") String memberId, @Param("date") LocalDateTime date);

	WxpayCallbackRecord selectByOutTradeNo(@Param("outTradeNo") String outTradeNo);
}