package com.inspect.metadata.mqtt.service.impl;

import com.inspect.base.core.text.Convert;
import com.inspect.metadata.mqtt.domain.HrMaintenance;
import com.inspect.metadata.mqtt.mapper.HrMaintenanceMapper;
import com.inspect.metadata.mqtt.service.IHrMaintenanceService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class HrMaintenanceServiceImpl implements IHrMaintenanceService {
    private final HrMaintenanceMapper maintenanceMapper;

    @Override
    public List<HrMaintenance> selectMaintenanceList(HrMaintenance maintenance) {
        return maintenanceMapper.selectMaintenanceList(maintenance);
    }

    @Override
    public int insertMaintenance(HrMaintenance maintenance) {
        return maintenanceMapper.insertMaintenance(maintenance);
    }

    @Override
    public int updateMaintenance(HrMaintenance maintenance) {
        return maintenanceMapper.updateMaintenance(maintenance);
    }

    @Override
    public int deleteMaintenanceByIds(String ids) {
        return maintenanceMapper.deleteMaintenanceByIds(Convert.toStrArray(ids));
    }

    @Override
    public HrMaintenance selectMaintenanceById(Long maintenanceId) {
        return maintenanceMapper.selectMaintenanceById(maintenanceId);
    }
}
