package com.ruoyi.blockchain.mapper;

import java.util.List;

import com.ruoyi.blockchain.domain.BlockchainTransaction;

/**
 * 区块链交易Mapper接口
 * 
 * @author ruoyi
 * @date 2025-12-19
 */
public interface BlockchainTransactionMapper 
{
    /**
     * 查询区块链交易
     * 
     * @param transactionId 区块链交易主键
     * @return 区块链交易
     */
    public BlockchainTransaction selectBlockchainTransactionByTransactionId(Long transactionId);

    /**
     * 根据交易哈希查询区块链交易
     * 
     * @param txHash 交易哈希
     * @return 区块链交易
     */
    public BlockchainTransaction selectByTxHash(String txHash);

    /**
     * 根据数据哈希查询区块链交易
     * 
     * @param dataHash 数据哈希
     * @return 区块链交易
     */
    public BlockchainTransaction selectByDataHash(String dataHash);

    /**
     * 根据合约地址查询区块链交易列表
     * 
     * @param contractAddress 合约地址
     * @return 区块链交易集合
     */
    public List<BlockchainTransaction> selectByContractAddress(String contractAddress);

    /**
     * 查询区块链交易列表
     * 
     * @param blockchainTransaction 区块链交易
     * @return 区块链交易集合
     */
    public List<BlockchainTransaction> selectBlockchainTransactionList(BlockchainTransaction blockchainTransaction);

    /**
     * 新增区块链交易
     * 
     * @param blockchainTransaction 区块链交易
     * @return 结果
     */
    public int insertBlockchainTransaction(BlockchainTransaction blockchainTransaction);

    /**
     * 修改区块链交易
     * 
     * @param blockchainTransaction 区块链交易
     * @return 结果
     */
    public int updateBlockchainTransaction(BlockchainTransaction blockchainTransaction);

    /**
     * 删除区块链交易
     * 
     * @param transactionId 区块链交易主键
     * @return 结果
     */
    public int deleteBlockchainTransactionByTransactionId(Long transactionId);

    /**
     * 批量删除区块链交易
     * 
     * @param transactionIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBlockchainTransactionByTransactionIds(Long[] transactionIds);
}