package com.zcloud.fire.check.persistence.repository.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jjb.saas.framework.repository.repo.impl.BaseRepositoryImpl;
import com.zcloud.fire.check.persistence.dataobject.UserDO;
import com.zcloud.fire.check.persistence.mapper.UserMapper;
import com.zcloud.fire.check.persistence.repository.UserRepository;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* web-infrastructure
* @Author zhangyue
* @Date 2025-11-04 14:07:37
*/
@Service
@RequiredArgsConstructor
public class UserRepositoryImpl extends BaseRepositoryImpl<UserMapper, UserDO> implements UserRepository {
    private final UserMapper userMapper;

    @Override
    public List<UserDO> listByCorpinfoId(Long corpinfoId) {
        QueryWrapper<UserDO> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("corpinfo_id", corpinfoId);
        return list(queryWrapper);
    }

    @Override
    public List<UserDO> getListById(List<Long> longs) {
        QueryWrapper<UserDO> queryWrapper = new QueryWrapper<>();
        queryWrapper.in("id", longs);
        return list(queryWrapper);
    }
}

