package com.zcloud.basic.info.persistence.repository.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
import com.zcloud.basic.info.persistence.dataobject.CorpInfoKeyDO;
import com.zcloud.basic.info.persistence.mapper.CorpInfoKeyMapper;
import com.zcloud.basic.info.persistence.repository.CorpInfoKeyRepository;
import org.springframework.stereotype.Service;

@Service
public class CorpInfoKeyRepositoryImpl extends BaseRepositoryImpl<CorpInfoKeyMapper, CorpInfoKeyDO> implements CorpInfoKeyRepository {

    @Override
    public CorpInfoKeyDO getByCorpinfoId(Long corpinfoId) {
        QueryWrapper<CorpInfoKeyDO> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("corpinfo_id", corpinfoId);
        return baseMapper.selectOne(queryWrapper);
    }
}
