package com.microservices.dms.achievementLibrary.service;

import java.util.List;
import com.microservices.common.core.utils.DateUtils;
import com.microservices.dms.achievementLibrary.domain.blockchain.InBlockchainData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.microservices.dms.achievementLibrary.mapper.InBlockchainDataMapper;


/**
 * 区块链数据入链Service业务层处理
 * 
 * @author microservices
 * @date 2025-05-27
 */
@Service
public class InBlockchainDataServiceImpl
{
    @Autowired
    private InBlockchainDataMapper inBlockchainDataMapper;

    /**
     * 查询区块链数据入链
     * 
     * @param id 区块链数据入链主键
     * @return 区块链数据入链
     */

    public InBlockchainData selectInBlockchainDataById(Long id)
    {
        return inBlockchainDataMapper.selectInBlockchainDataById(id);
    }

    /**
     * 查询区块链数据入链列表
     * 
     * @param inBlockchainData 区块链数据入链
     * @return 区块链数据入链
     */

    public List<InBlockchainData> selectInBlockchainDataList(InBlockchainData inBlockchainData)
    {
        return inBlockchainDataMapper.selectInBlockchainDataList(inBlockchainData);
    }

    /**
     * 新增区块链数据入链
     * 
     * @param inBlockchainData 区块链数据入链
     * @return 结果
     */

    public int insertInBlockchainData(InBlockchainData inBlockchainData)
    {
        inBlockchainData.setCreateTime(DateUtils.getNowDate());
        return inBlockchainDataMapper.insertInBlockchainData(inBlockchainData);
    }

    /**
     * 修改区块链数据入链
     * 
     * @param inBlockchainData 区块链数据入链
     * @return 结果
     */

    public int updateInBlockchainData(InBlockchainData inBlockchainData)
    {
        return inBlockchainDataMapper.updateInBlockchainData(inBlockchainData);
    }

    /**
     * 批量删除区块链数据入链
     * 
     * @param ids 需要删除的区块链数据入链主键
     * @return 结果
     */

    public int deleteInBlockchainDataByIds(Long[] ids)
    {
        return inBlockchainDataMapper.deleteInBlockchainDataByIds(ids);
    }

    /**
     * 删除区块链数据入链信息
     * 
     * @param id 区块链数据入链主键
     * @return 结果
     */

    public int deleteInBlockchainDataById(Long id)
    {
        return inBlockchainDataMapper.deleteInBlockchainDataById(id);
    }
}
