package com.ruoyi.interfaces.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.interfaces.mapper.MdDataSetSqlMapper;
import com.ruoyi.interfaces.domain.MdDataSetSql;
import com.ruoyi.interfaces.service.IMdDataSetSqlService;

/**
 * sql数据集Service业务层处理
 * 
 * @author 朱得糠
 * @date 2025-09-02
 */
@Service
public class MdDataSetSqlServiceImpl implements IMdDataSetSqlService 
{
    @Autowired
    private MdDataSetSqlMapper mdDataSetSqlMapper;

    /**
     * 查询sql数据集
     * 
     * @param id sql数据集主键
     * @return sql数据集
     */
    @Override
    public MdDataSetSql selectMdDataSetSqlByDcCode(String id)
    {
        return mdDataSetSqlMapper.selectMdDataSetSqlByDcCode(id);
    }

    /**
     * 查询sql数据集列表
     * 
     * @param mdDataSetSql sql数据集
     * @return sql数据集
     */
    @Override
    public List<MdDataSetSql> selectMdDataSetSqlList(MdDataSetSql mdDataSetSql)
    {
        return mdDataSetSqlMapper.selectMdDataSetSqlList(mdDataSetSql);
    }

    /**
     * 新增sql数据集
     * 
     * @param mdDataSetSql sql数据集
     * @return 结果
     */
    @Override
    public int insertMdDataSetSql(MdDataSetSql mdDataSetSql)
    {
        return mdDataSetSqlMapper.insertMdDataSetSql(mdDataSetSql);
    }

    /**
     * 修改sql数据集
     * 
     * @param mdDataSetSql sql数据集
     * @return 结果
     */
    @Override
    public int updateMdDataSetSql(MdDataSetSql mdDataSetSql)
    {
        return mdDataSetSqlMapper.updateMdDataSetSql(mdDataSetSql);
    }

    /**
     * 批量删除sql数据集
     * 
     * @param ids 需要删除的sql数据集主键
     * @return 结果
     */
    @Override
    public int deleteMdDataSetSqlByIds(Long[] ids)
    {
        return mdDataSetSqlMapper.deleteMdDataSetSqlByIds(ids);
    }

    /**
     * 删除sql数据集信息
     * 
     * @param id sql数据集主键
     * @return 结果
     */
    @Override
    public int deleteMdDataSetSqlById(Long id)
    {
        return mdDataSetSqlMapper.deleteMdDataSetSqlById(id);
    }

    @Override
    public int deleteMdDataSetSqlByDcCode(String dcCode) {
        return mdDataSetSqlMapper.deleteMdDataSetSqlByDcCode(dcCode);
    }
}
