package com.ningdatech.pmapi.meeting.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ningdatech.basic.model.PagePo;
import com.ningdatech.pmapi.common.model.entity.CountGroupByDTO;
import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpert;
import com.ningdatech.pmapi.meeting.entity.domain.MeetingExpertEvaluation;
import com.ningdatech.pmapi.meeting.mapper.MeetingExpertEvaluationMapper;
import com.ningdatech.pmapi.meeting.service.IMeetingExpertEvaluationService;
import org.springframework.stereotype.Service;

import java.util.Collection;

/**
 * <p>
 * 专家评价表 服务实现类
 * </p>
 *
 * @author WendyYang
 * @since 2022-07-25
 */
@Service
public class MeetingExpertEvaluationServiceImpl extends ServiceImpl<MeetingExpertEvaluationMapper, MeetingExpertEvaluation> implements IMeetingExpertEvaluationService {

    @Override
    public Page<CountGroupByDTO<Long>> listExpertAttendSummary(Collection<Long> expertIds, Boolean isAttended, Page<CountGroupByDTO<Long>> page) {
        return baseMapper.countExpertAttend(expertIds, isAttended, page);
    }

    @Override
    public Page<MeetingExpert> pageExpertEvaluationTodo(Collection<Long> meetingIds, PagePo po) {
        return baseMapper.pageExpertEvaluationToDo(meetingIds, new Page<>(po.getPageNumber(), po.getPageSize()));
    }

}
