package com.yeejoin.amos.boot.module.elevator.biz.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.amos.boot.module.elevator.api.dto.MaintenanceUnitDto;
import com.yeejoin.amos.boot.module.elevator.api.entity.MaintenanceUnit;
import com.yeejoin.amos.boot.module.elevator.api.mapper.MaintenanceUnitMapper;
import com.yeejoin.amos.boot.module.elevator.api.service.IMaintenanceUnitService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
*  服务实现类
*
* @author tb
* @date 2021-06-01
*/
@Service
public class MaintenanceUnitServiceImpl extends ServiceImpl<MaintenanceUnitMapper, MaintenanceUnit> implements IMaintenanceUnitService {

    @Override
    public List<MaintenanceUnitDto> selectExportData(String exportId) {
        List<String> ids = null;
        if(StringUtils.isNotEmpty(exportId)) {
            String[] idStr = exportId.split(",");
            ids = Arrays.asList(idStr);
        }
        return baseMapper.selectExportData(ids);
    }

    @Override
    public Map<String, Object> selectMessage(String record) {
        return baseMapper.selectMessage(record);
    }
}
