package com.docus.server.archivefile.infrastructure.dao.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.docus.infrastructure.core.db.dao.impl.BaseDaoImpl;
import com.docus.server.archivefile.infrastructure.dao.IAfViewCollectionLogDao;
import com.docus.server.archivefile.infrastructure.mapper.AfViewCollectionLogMapper;
import com.docus.server.archivefile.infrastructure.entity.AfViewCollectionLog;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class AfViewCollectionLogDaoImpl extends BaseDaoImpl<AfViewCollectionLogMapper, AfViewCollectionLog> implements IAfViewCollectionLogDao {

    @Override
    public List<AfViewCollectionLog> findByJzhAndSysCode(List<String> jzhs, String syscode) {
        LambdaQueryWrapper<AfViewCollectionLog> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.in(AfViewCollectionLog::getJzh, jzhs).eq(AfViewCollectionLog::getSysCode, syscode);
        return super.find(queryWrapper);
    }

}
