package com.phm.manage.service.impl;

import com.phm.manage.domain.GroundDiagnosisModel;
import com.phm.manage.mapper.GroundDiagnosisModelMapper;
import com.phm.manage.service.IGroundDiagnosisModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 地面诊断模型信息Service业务层处理
 *
 * @author phm
 * @date 2023-08-22
 */
@Service
public class GroundDiagnosisModelServiceImpl implements IGroundDiagnosisModelService {
    @Autowired
    private GroundDiagnosisModelMapper groundDiagnosisModelMapper;

    /**
     * 查询地面诊断模型信息
     *
     * @param id 地面诊断模型信息主键
     * @return 地面诊断模型信息
     */
    @Override
    public GroundDiagnosisModel selectGroundDiagnosisModelById(Long id) {
        return groundDiagnosisModelMapper.selectGroundDiagnosisModelById(id);
    }

    /**
     * 查询地面诊断模型信息列表
     *
     * @param groundDiagnosisModel 地面诊断模型信息
     * @return 地面诊断模型信息
     */
    @Override
    public List<GroundDiagnosisModel> selectGroundDiagnosisModelList(GroundDiagnosisModel groundDiagnosisModel) {
        return groundDiagnosisModelMapper.selectGroundDiagnosisModelList(groundDiagnosisModel);
    }

    /**
     * 新增地面诊断模型信息
     *
     * @param groundDiagnosisModel 地面诊断模型信息
     * @return 结果
     */
    @Override
    public int insertGroundDiagnosisModel(GroundDiagnosisModel groundDiagnosisModel) {
        return groundDiagnosisModelMapper.insertGroundDiagnosisModel(groundDiagnosisModel);
    }

    /**
     * 修改地面诊断模型信息
     *
     * @param groundDiagnosisModel 地面诊断模型信息
     * @return 结果
     */
    @Override
    public int updateGroundDiagnosisModel(GroundDiagnosisModel groundDiagnosisModel) {
        return groundDiagnosisModelMapper.updateGroundDiagnosisModel(groundDiagnosisModel);
    }

    /**
     * 批量删除地面诊断模型信息
     *
     * @param ids 需要删除的地面诊断模型信息主键
     * @return 结果
     */
    @Override
    public int deleteGroundDiagnosisModelByIds(Long[] ids) {
        return groundDiagnosisModelMapper.deleteGroundDiagnosisModelByIds(ids);
    }

    /**
     * 删除地面诊断模型信息信息
     *
     * @param id 地面诊断模型信息主键
     * @return 结果
     */
    @Override
    public int deleteGroundDiagnosisModelById(Long id) {
        return groundDiagnosisModelMapper.deleteGroundDiagnosisModelById(id);
    }
}
