package com.usky.fire.service.impl;

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

import java.util.List;

/**
 * <p>
 * 高层公共建筑底数 服务实现类
 * </p>
 *
 * @author han
 * @since 2023-03-31
 */
@Service
public class DemHighRiseServiceImpl extends AbstractCrudService<DemHighRiseMapper, DemHighRise> implements DemHighRiseService {
    @Override
    public List<DemHighRise> demHighRiseList(Integer id) {
        LambdaQueryWrapper<DemHighRise> query = Wrappers.lambdaQuery();
        if (id != 0){
            query.eq(DemHighRise::getId, id);
        }
        List<DemHighRise> list = this.list(query);
        return list;
    }
}
