package com.mindskip.xzs.service.impl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.mindskip.xzs.domain.ExamTemplates; import com.mindskip.xzs.domain.ExamTemplatesUserCount; import com.mindskip.xzs.domain.User; import com.mindskip.xzs.domain.vo.ExamTemplatesUserCountVO; import com.mindskip.xzs.domain.vo.TemplatesUserVO; import com.mindskip.xzs.domain.vo.UserCountExcelVO; import com.mindskip.xzs.repository.BaseMapper; import com.mindskip.xzs.repository.ExamTemplatesMapper; import com.mindskip.xzs.repository.ExamTemplatesUserCountMapper; import com.mindskip.xzs.service.ExamTemplatesUserCountService; import com.mindskip.xzs.service.UserService; import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperPageRequestVM; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; @Service public class ExamTemplatesUserCountServiceImpl extends BaseServiceImpl implements ExamTemplatesUserCountService { private final ExamTemplatesUserCountMapper examTemplatesUserCountMapper; private final ExamTemplatesMapper examTemplatesMapper; private final UserService userService; public ExamTemplatesUserCountServiceImpl(BaseMapper baseMapper, ExamTemplatesUserCountMapper examTemplatesUserCountMapper, ExamTemplatesMapper examTemplatesMapper, UserService userService) { super(baseMapper); this.examTemplatesUserCountMapper = examTemplatesUserCountMapper; this.examTemplatesMapper = examTemplatesMapper; this.userService = userService; } @Override public Integer add(ExamTemplatesUserCount examTemplatesUserCount) { return examTemplatesUserCountMapper.add(examTemplatesUserCount); } @Override public PageInfo list(ExamPaperPageRequestVM requestVM) { return PageHelper.startPage(requestVM.getPageIndex(), requestVM.getPageSize(), "id desc").doSelectPageInfo(() -> examTemplatesUserCountMapper.list(requestVM)); } @Override public List userCountList(ExamPaperPageRequestVM requestVM) { return examTemplatesUserCountMapper.list(requestVM); } @Override public List getByUserIdAndTemplatesId(ExamTemplatesUserCountVO examTemplatesUserCountVO) { return examTemplatesUserCountMapper.getByUserIdAndTemplatesId(examTemplatesUserCountVO); } @Override public List getByTemplates(Integer id) { return examTemplatesUserCountMapper.getByTemplates(id); } @Override public List getByExamTemplates(Integer id) { return examTemplatesUserCountMapper.getByExamTemplates(id); } @Override public List getByExamTemplatesUser(Integer id) { return examTemplatesUserCountMapper.getByExamTemplatesUser(id); } }