package com.usky.fire.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.usky.fire.domain.DemHighRise;
import com.usky.fire.domain.DemStreetMicroStation;
import com.usky.fire.mapper.DemStreetMicroStationMapper;
import com.usky.fire.service.DemStreetMicroStationService;
import com.usky.common.mybatis.core.AbstractCrudService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 街镇微型消防站 服务实现类
 * </p>
 *
 * @author han
 * @since 2023-04-06
 */
@Service
public class DemStreetMicroStationServiceImpl extends AbstractCrudService<DemStreetMicroStationMapper, DemStreetMicroStation> implements DemStreetMicroStationService {
    @Override
    public List<DemStreetMicroStation> demStreetMicroStationList(String streetTown) {
        LambdaQueryWrapper<DemStreetMicroStation> query = Wrappers.lambdaQuery();
        query.eq(StringUtils.isNotBlank(streetTown),DemStreetMicroStation::getStreetTown, streetTown);
        List<DemStreetMicroStation> list = this.list(query);
        return list;
    }
}
