package com.microservices.dms.achievementLibrary.mapper;

import java.util.List;
import java.util.Map;

import com.microservices.common.datasource.annotation.Slave;
import com.microservices.dms.achievementLibrary.domain.BlockchainListQueryVo;
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
import com.microservices.dms.achievementLibrary.domain.blockchain.InBlockchainData;
import com.microservices.dms.common.vo.CommitCreateVo;
import com.microservices.dms.common.vo.CommitResultVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 区块链数据入链Mapper接口
 * 
 * @author microservices
 * @date 2025-05-27
 */
@Mapper
@Slave
public interface InBlockchainDataMapper 
{
    /**
     * 查询区块链数据入链
     * 
     * @param id 区块链数据入链主键
     * @return 区块链数据入链
     */
    public InBlockchainData selectInBlockchainDataById(Long id);

    /**
     * 查询区块链数据入链列表
     * 
     * @param inBlockchainData 区块链数据入链
     * @return 区块链数据入链集合
     */
    public List<InBlockchainData> selectInBlockchainDataList(InBlockchainData inBlockchainData);

    /**
     * 新增区块链数据入链
     * 
     * @param inBlockchainData 区块链数据入链
     * @return 结果
     */
    public int insertInBlockchainData(InBlockchainData inBlockchainData);

    /**
     * 修改区块链数据入链
     * 
     * @param inBlockchainData 区块链数据入链
     * @return 结果
     */
    public int updateInBlockchainData(InBlockchainData inBlockchainData);

    /**
     * 删除区块链数据入链
     * 
     * @param id 区块链数据入链主键
     * @return 结果
     */
    public int deleteInBlockchainDataById(Long id);

    /**
     * 批量删除区块链数据入链
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteInBlockchainDataByIds(Long[] ids);

    List<Map<String, Object>> issueDataList(BlockchainListQueryVo queryVo);

    List<Map<String, Object>> commitDataList(BlockchainListQueryVo queryVo);

    List<Map<String, Object>> prDataList(BlockchainListQueryVo queryVo);

    List<String> getNeedToBlockCommitList();

    List<CommitResultVo>  getCommitListById(@Param("projectId") String projectId);
}
