package com.phm.manage.service.impl;

import com.phm.manage.domain.MaintenanceTestControl;
import com.phm.manage.mapper.MaintenanceTestControlMapper;
import com.phm.manage.service.IMaintenanceTestControlService;
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 MaintenanceTestControlServiceImpl implements IMaintenanceTestControlService {
    @Autowired
    private MaintenanceTestControlMapper maintenanceTestControlMapper;

    /**
     * 查询维修测试控制
     *
     * @param id 维修测试控制主键
     * @return 维修测试控制
     */
    @Override
    public MaintenanceTestControl selectMaintenanceTestControlById(Long id) {
        return maintenanceTestControlMapper.selectMaintenanceTestControlById(id);
    }

    /**
     * 查询维修测试控制列表
     *
     * @param maintenanceTestControl 维修测试控制
     * @return 维修测试控制
     */
    @Override
    public List<MaintenanceTestControl> selectMaintenanceTestControlList(MaintenanceTestControl maintenanceTestControl) {
        return maintenanceTestControlMapper.selectMaintenanceTestControlList(maintenanceTestControl);
    }

    /**
     * 新增维修测试控制
     *
     * @param maintenanceTestControl 维修测试控制
     * @return 结果
     */
    @Override
    public int insertMaintenanceTestControl(MaintenanceTestControl maintenanceTestControl) {
        return maintenanceTestControlMapper.insertMaintenanceTestControl(maintenanceTestControl);
    }

    /**
     * 修改维修测试控制
     *
     * @param maintenanceTestControl 维修测试控制
     * @return 结果
     */
    @Override
    public int updateMaintenanceTestControl(MaintenanceTestControl maintenanceTestControl) {
        return maintenanceTestControlMapper.updateMaintenanceTestControl(maintenanceTestControl);
    }

    /**
     * 批量删除维修测试控制
     *
     * @param ids 需要删除的维修测试控制主键
     * @return 结果
     */
    @Override
    public int deleteMaintenanceTestControlByIds(Long[] ids) {
        return maintenanceTestControlMapper.deleteMaintenanceTestControlByIds(ids);
    }

    /**
     * 删除维修测试控制信息
     *
     * @param id 维修测试控制主键
     * @return 结果
     */
    @Override
    public int deleteMaintenanceTestControlById(Long id) {
        return maintenanceTestControlMapper.deleteMaintenanceTestControlById(id);
    }
}
