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.domain.DmpDevice;
import com.usky.cdi.mapper.DmpDeviceMapper;
import com.usky.cdi.service.DmpDeviceInfoService;
import com.usky.common.mybatis.core.AbstractCrudService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 设备信息表 服务实现类
 * </p>
 *
 * @author ya
 * @since 2022-10-08
 */
@Slf4j
@Service
public class DmpDeviceInfoServiceImpl extends AbstractCrudService<DmpDeviceMapper, DmpDevice> implements DmpDeviceInfoService {
    @Override
    public List<DmpDevice> deviceInfo(Integer tenantId){
        LambdaQueryWrapper<DmpDevice> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(DmpDevice::getDeleteFlag,0)
                .eq(DmpDevice::getTenantId, tenantId);
        List<DmpDevice> list = this.list(queryWrapper);
        return list;
    }
}
