package com.jiayue.insu.incloud.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jiayue.insu.incloud.entity.IntegrationCompany;
import com.jiayue.insu.incloud.mapper.IntegrationCompanyMapper;
import com.jiayue.insu.incloud.service.IntegrationCompanyService;
import org.springframework.stereotype.Service;
/**
 * 预测数据业务实现
 *
 * @author yh
 * @version 1.0
 * @since 2022/5/22 11:29
 */
@Service
public class IntegrationCompanyServiceImpl extends ServiceImpl<IntegrationCompanyMapper, IntegrationCompany> implements IntegrationCompanyService {

    /**
     *  通过code查询公司
     * @param code
     * @return 结果
     */
    @Override
    public IntegrationCompany findByCode(String code) {
        LambdaQueryWrapper<IntegrationCompany> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(IntegrationCompany::getCode,code);
        return this.getOne(lambdaQueryWrapper);
    }
}
