package com.gyee.alarm.service.auto.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gyee.alarm.model.auto.ProBasicDataDictionary;
import com.gyee.alarm.model.auto.ProBasicDeviceMetrics;
import com.gyee.alarm.model.auto.ProBasicPowerstation;
import com.gyee.alarm.mapper.auto.ProBasicPowerstationMapper;
import com.gyee.alarm.service.auto.IProBasicPowerstationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gyee.common.model.StringUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 场站表 服务实现类
 * </p>
 *
 * @author shilin
 * @since 2022-11-12
 */
@Service
public class ProBasicPowerstationServiceImpl extends ServiceImpl<ProBasicPowerstationMapper, ProBasicPowerstation> implements IProBasicPowerstationService {

    @Override
    public List<ProBasicPowerstation> getStationAll(String id) {
        QueryWrapper<ProBasicPowerstation> qw = new QueryWrapper<>();
        if (StringUtils.isNotEmpty(id)) {
            qw.lambda().eq(ProBasicPowerstation::getId, id);
        }
        List<ProBasicPowerstation> list = baseMapper.selectList(qw);
        return list;
    }
}
