package cn.com.oa.service.impl;

import cn.com.oa.mapper.CompanyMapper;
import cn.com.v2.mapper.GoviewProjectDataMapper;
import cn.com.oa.model.Company;
import cn.com.v2.model.GoviewProjectData;
import cn.com.oa.service.ICompanyService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 */
@Service
public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> implements ICompanyService {
    @Value("${oa.domain}")
    private String oaDomain;
    @Override
    public Company getCompany() {
        LambdaQueryWrapper<Company> lambdaQueryWrapper=new LambdaQueryWrapper<Company>();
        lambdaQueryWrapper.eq(Company::getDomain, oaDomain).eq(Company::getState,"0");
        return baseMapper.selectOne(lambdaQueryWrapper);
    }
}
