package com.ruoyi.payment.infrastructure.persistence.mapper;
|
|
import com.ruoyi.payment.domain.model.PaymentTransaction;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Param;
|
|
/**
|
* 支付交易Mapper
|
*
|
* @author ruoyi
|
*/
|
@Mapper
|
public interface PaymentTransactionMapper {
|
|
/**
|
* 插入交易记录
|
*/
|
int insert(PaymentTransaction transaction);
|
|
/**
|
* 更新交易记录
|
*/
|
int update(PaymentTransaction transaction);
|
|
/**
|
* 根据ID查询交易
|
*/
|
PaymentTransaction selectById(@Param("id") Long id);
|
|
/**
|
* 查询订单的待支付交易
|
*/
|
PaymentTransaction selectPendingByOrderId(@Param("orderId") Long orderId);
|
|
/**
|
* 根据渠道交易号查询
|
*/
|
PaymentTransaction selectByChannelTradeNo(@Param("channelTradeNo") String channelTradeNo);
|
|
/**
|
* 查询订单的最新交易
|
*/
|
PaymentTransaction selectLatestByOrderId(@Param("orderId") Long orderId);
|
}
|