xiangpei
2025-05-14 47cd9ecc0eff38ffe6b3b794b2bf197e958f4403
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
37
38
39
40
41
42
43
44
45
package com.mindskip.xzs.utility.convert;
 
import com.mindskip.xzs.domain.ExamTemplates;
import com.mindskip.xzs.domain.ExamTemplatesQuestion;
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
import com.mindskip.xzs.viewmodel.admin.exam.QuestionTypeVM;
import com.mindskip.xzs.viewmodel.admin.question.QuestionEditRequestVM;
import com.mindskip.xzs.viewmodel.admin.question.QuestionEditVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;
 
import java.util.List;
 
@Mapper
public interface ExamTemplatesClassConvert {
    ExamTemplatesClassConvert INSTANCE = Mappers.getMapper(ExamTemplatesClassConvert.class);
 
    @Mappings({
            @Mapping(source = "name",target = "name"),
            @Mapping(source = "paperType",target = "paperType"),
            @Mapping(source = "suggestTime",target = "suggestTime"),
    })
    ExamTemplates ExamPaperEditRequestVMToExamTemplates(ExamPaperEditRequestVM examPaperEditRequestVM);
 
    @Mappings({
            @Mapping(source = "id",target = "id"),
            @Mapping(source = "name",target = "name"),
            @Mapping(source = "paperType",target = "paperType"),
            @Mapping(source = "suggestTime",target = "suggestTime"),
            @Mapping(source = "deptId",target = "deptId"),
    })
    ExamPaperEditRequestVM ExamTemplatesToExamPaperEditRequestVM(ExamTemplates examTemplates);
 
    List<QuestionTypeVM> ExamTemplatesQuestionListToQuestionTypeVMList(List<ExamTemplatesQuestion> examTemplatesQuestions);
 
    @Mappings({
            @Mapping(source = "label",target = "label"),
            @Mapping(source = "subjectId",target = "subjectId"),
    })
    List<ExamTemplatesQuestion> QuestionTypeVMListToExamTemplatesQuestionList(List<QuestionTypeVM> questionTypeVMList);
 
 
}