package com.usky.cdi.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.usky.cdi.domain.BaseBuildFacility;
import com.usky.cdi.mapper.BaseBuildFacilityMapper;
import com.usky.cdi.service.BaseBuildFacilityService;
import com.usky.common.mybatis.core.AbstractCrudService;
import com.usky.common.security.utils.SecurityUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 建筑设施 服务实现类
 * </p>
 *
 * @author fu
 * @since 2025-12-02
 */
@Service
public class BaseBuildFacilityServiceImpl extends AbstractCrudService<BaseBuildFacilityMapper, BaseBuildFacility> implements BaseBuildFacilityService {
    @Override
    public List<BaseBuildFacility> facilityInfo(Integer tenantId){
        LambdaQueryWrapper<BaseBuildFacility> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(BaseBuildFacility::getDeleteFlag,0)
                .eq(BaseBuildFacility::getTenantId, tenantId);
        List<BaseBuildFacility> list = this.list(queryWrapper);
        return list;
    }
}
