package com.docus.server.archivefile.service.impl;

import com.docus.infrastructure.core.db.dao.IBaseDao;
import com.docus.server.archivefile.infrastructure.dao.IAfViewCollectionLogDao;
import com.docus.server.archivefile.infrastructure.entity.AfViewCollectionLog;
import com.docus.server.archivefile.service.IAfViewCollectionLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author linrf
 * @date 2023/6/13 17:06
 */
@Service
public class AfViewCollectionLogServiceImpl implements IAfViewCollectionLogService {
    @Resource
    private IAfViewCollectionLogDao collectionLogDao;

    @Override
    public List<AfViewCollectionLog> findByJzhAndSysCode(List<String> jzhs, String syscode) {
        return collectionLogDao.findByJzhAndSysCode(jzhs, syscode);
    }

    @Override
    public void insertBatchAfViewCollectionLogs(List<AfViewCollectionLog> collectionLogs) {
        collectionLogDao.saveOrUpdateBatch(collectionLogs, IBaseDao.DEFAULT_BATCH_SIZE);
    }
}
