package com.sf.deployment.service.impl;

import java.util.List;
import com.sf.common.utils.DateUtils;
import com.sf.system.deployment.domain.DeploymentApplyEnvironment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sf.deployment.mapper.DeploymentApplyEnvironmentMapper;
import com.sf.deployment.service.IDeploymentApplyEnvironmentService;

/**
 * 环境维护Service业务层处理
 * 
 * @author ztzh
 * @date 2024-04-19
 */
@Service
public class DeploymentApplyEnvironmentServiceImpl implements IDeploymentApplyEnvironmentService 
{
    @Autowired
    private DeploymentApplyEnvironmentMapper deploymentApplyEnvironmentMapper;

    /**
     * 查询环境维护
     * 
     * @param id 环境维护主键
     * @return 环境维护
     */
    @Override
    public DeploymentApplyEnvironment selectDeploymentApplyEnvironmentById(Long id)
    {
        return deploymentApplyEnvironmentMapper.selectDeploymentApplyEnvironmentById(id);
    }

    /**
     * 查询环境维护列表
     * 
     * @param deploymentApplyEnvironment 环境维护
     * @return 环境维护
     */
    @Override
    public List<DeploymentApplyEnvironment> selectDeploymentApplyEnvironmentList(DeploymentApplyEnvironment deploymentApplyEnvironment)
    {
        return deploymentApplyEnvironmentMapper.selectDeploymentApplyEnvironmentList(deploymentApplyEnvironment);
    }

    /**
     * 新增环境维护
     * 
     * @param deploymentApplyEnvironment 环境维护
     * @return 结果
     */
    @Override
    public int insertDeploymentApplyEnvironment(DeploymentApplyEnvironment deploymentApplyEnvironment)
    {
        deploymentApplyEnvironment.setCreateTime(DateUtils.getNowDate());
        return deploymentApplyEnvironmentMapper.insertDeploymentApplyEnvironment(deploymentApplyEnvironment);
    }

    /**
     * 修改环境维护
     * 
     * @param deploymentApplyEnvironment 环境维护
     * @return 结果
     */
    @Override
    public int updateDeploymentApplyEnvironment(DeploymentApplyEnvironment deploymentApplyEnvironment)
    {
        deploymentApplyEnvironment.setUpdateTime(DateUtils.getNowDate());
        return deploymentApplyEnvironmentMapper.updateDeploymentApplyEnvironment(deploymentApplyEnvironment);
    }

    /**
     * 批量删除环境维护
     * 
     * @param ids 需要删除的环境维护主键
     * @return 结果
     */
    @Override
    public int deleteDeploymentApplyEnvironmentByIds(Long[] ids)
    {
        return deploymentApplyEnvironmentMapper.deleteDeploymentApplyEnvironmentByIds(ids);
    }

    /**
     * 删除环境维护信息
     * 
     * @param id 环境维护主键
     * @return 结果
     */
    @Override
    public int deleteDeploymentApplyEnvironmentById(Long id)
    {
        return deploymentApplyEnvironmentMapper.deleteDeploymentApplyEnvironmentById(id);
    }
}
