package cn.stylefeng.team.project.modular.filing.service.impl;

import cn.stylefeng.team.project.modular.filing.entity.BusinessFilingLog;
import cn.stylefeng.team.project.modular.filing.mapper.BusinessFilingLogMapper;
import cn.stylefeng.team.project.modular.filing.service.BusinessFilingLogService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BusinessFilingLogServiceImpl extends ServiceImpl<BusinessFilingLogMapper, BusinessFilingLog> implements BusinessFilingLogService {

    @Override
    public List<BusinessFilingLog> getUserFilingLogList(Long userId, Long deptId, List<Long> businessId) {
        LambdaQueryWrapper<BusinessFilingLog> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(BusinessFilingLog::getUserId, userId);
        queryWrapper.eq(BusinessFilingLog::getUserOwnDeptId, deptId);
        queryWrapper.in(BusinessFilingLog::getBusinessId, businessId);
        return this.list(queryWrapper);
    }

}