package com.hdkj.lt.mq.service.fault.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hdkj.lt.core.bizms.modle.dto.TransformerNameDTO;
import com.hdkj.lt.core.bizms.modle.po.fault.FaultAwaitTransferUsers;
import com.hdkj.lt.mq.mapper.fault.FaultAwaitTransferUsersMapper;
import com.hdkj.lt.mq.service.fault.IFaultAwaitTransferUsersService;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
 * @Description
 * @Author wcx
 * @Date 2025/5/24 22:57
 * @Version 1.0
 */
@Service
public class FaultAwaitTransferUsersServiceImpl extends ServiceImpl<FaultAwaitTransferUsersMapper, FaultAwaitTransferUsers> implements IFaultAwaitTransferUsersService {
    @Override
    public List<String> getTransformerNameByTransformerNo(String transformerNo) {
        List<String> list = this.baseMapper.getTransformerNameByTransformerNo(transformerNo);
        if (list == null || list.isEmpty()) {
            list = this.baseMapper.getTransformerNameListByJoinecId(transformerNo);
        }
        return list;
    }

    @Override
    public Map<String, TransformerNameDTO> getTransformerName() {
        return this.baseMapper.getTransformerName();
    }
}
