qirong
2023-07-28 fbdd6af3039a83cd4727a03cecb7c5914277371f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.mindskip.xzs.utility.convert;
 
import com.mindskip.xzs.domain.ExamPaperAnswer;
import com.mindskip.xzs.domain.ExamTemplates;
import com.mindskip.xzs.domain.vo.AnswerVO;
import com.mindskip.xzs.domain.vo.ExamTemplatesUserCountVO;
import com.mindskip.xzs.domain.vo.UserCountExcelVO;
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
 
import java.util.List;
 
@Mapper
public interface UserCountExcelClassConvert {
 
    UserCountExcelClassConvert INSTANCE = Mappers.getMapper(UserCountExcelClassConvert.class);
 
    @Mappings({
            @Mapping(source = "name",target = "name"),
            @Mapping(source = "userName",target = "userName"),
            @Mapping(source = "count",target = "count"),
    })
    List<UserCountExcelVO> ExamTemplatesUserCountVOListToUserCountExcelVOList(List<ExamTemplatesUserCountVO> examTemplatesUserCountVOS);
 
 
    @Mappings({
            @Mapping(source = "paperScore",target = "paperScore"),
            @Mapping(source = "userScore",target = "userScore"),
            @Mapping(source = "doTime",target = "doTime"),
    })
    List<AnswerVO> ExamPaperAnswerListToAnswerVOList(List<ExamPaperAnswer> examPaperAnswers);
 
}