package com.phm.manage.service.impl;

import java.util.List;
import com.phm.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.phm.manage.mapper.DataDownResultMapper;
import com.phm.manage.domain.DataDownResult;
import com.phm.manage.service.IDataDownResultService;

/**
 * 数据下载Service业务层处理
 * 
 * @author phm
 * @date 2023-08-24
 */
@Service
public class DataDownResultServiceImpl implements IDataDownResultService 
{
    @Autowired
    private DataDownResultMapper dataDownResultMapper;

    /**
     * 查询数据下载
     * 
     * @param id 数据下载主键
     * @return 数据下载
     */
    @Override
    public DataDownResult selectDataDownResultById(Long id)
    {
        return dataDownResultMapper.selectDataDownResultById(id);
    }

    /**
     * 查询数据下载列表
     * 
     * @param dataDownResult 数据下载
     * @return 数据下载
     */
    @Override
    public List<DataDownResult> selectDataDownResultList(DataDownResult dataDownResult)
    {
        return dataDownResultMapper.selectDataDownResultList(dataDownResult);
    }

    /**
     * 新增数据下载
     * 
     * @param dataDownResult 数据下载
     * @return 结果
     */
    @Override
    public int insertDataDownResult(DataDownResult dataDownResult)
    {
        dataDownResult.setCreateTime(DateUtils.getNowDate());
        return dataDownResultMapper.insertDataDownResult(dataDownResult);
    }

    /**
     * 修改数据下载
     * 
     * @param dataDownResult 数据下载
     * @return 结果
     */
    @Override
    public int updateDataDownResult(DataDownResult dataDownResult)
    {
        dataDownResult.setUpdateTime(DateUtils.getNowDate());
        return dataDownResultMapper.updateDataDownResult(dataDownResult);
    }

    /**
     * 批量删除数据下载
     * 
     * @param ids 需要删除的数据下载主键
     * @return 结果
     */
    @Override
    public int deleteDataDownResultByIds(Long[] ids)
    {
        return dataDownResultMapper.deleteDataDownResultByIds(ids);
    }

    /**
     * 删除数据下载信息
     * 
     * @param id 数据下载主键
     * @return 结果
     */
    @Override
    public int deleteDataDownResultById(Long id)
    {
        return dataDownResultMapper.deleteDataDownResultById(id);
    }
}
