1
935090232@qq.com
2021-01-27 f99c2be9a02fbb88dc9331b026e21821ecfeff8b
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package com.matrix.system.app.mapper;
 
import com.matrix.system.app.dto.QuestionAnswerItemDto;
import com.matrix.system.app.vo.QuestionVo;
import com.matrix.system.hive.bean.Answer;
import com.matrix.system.hive.bean.Question;
import com.matrix.system.hive.bean.VipAnswer;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;
 
@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2021-01-26T20:08:10+0800",
    comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
)
public class QuestionMapperImpl extends QuestionMapper {
 
    @Override
    public QuestionVo entityToVo(Question question) {
        if ( question == null ) {
            return null;
        }
 
        QuestionVo questionVo = new QuestionVo();
 
        questionVo.setId( question.getId() );
        questionVo.setQuestion( question.getQuestion() );
        questionVo.setType( question.getType() );
        List<Answer> list = question.getAnswers();
        if ( list != null ) {
            questionVo.setAnswers( new ArrayList<Answer>( list ) );
        }
        questionVo.setVipAnswer( question.getVipAnswer() );
 
        return questionVo;
    }
 
    @Override
    public List<QuestionVo> entitiesToVos(List<Question> list) {
        if ( list == null ) {
            return null;
        }
 
        List<QuestionVo> list1 = new ArrayList<QuestionVo>( list.size() );
        for ( Question question : list ) {
            list1.add( entityToVo( question ) );
        }
 
        return list1;
    }
 
    @Override
    public VipAnswer dtoToVipAnswer(QuestionAnswerItemDto questionAnswerDto) {
        if ( questionAnswerDto == null ) {
            return null;
        }
 
        VipAnswer vipAnswer = new VipAnswer();
 
        vipAnswer.setQuesionId( questionAnswerDto.getQuestionId() );
        vipAnswer.setVipId( questionAnswerDto.getVipId() );
        vipAnswer.setAnswerId( questionAnswerDto.getAnswerId() );
        vipAnswer.setAnswerText( questionAnswerDto.getAnswerText() );
 
        return vipAnswer;
    }
 
    @Override
    public List<VipAnswer> dtosToVipAnswers(List<QuestionAnswerItemDto> list) {
        if ( list == null ) {
            return null;
        }
 
        List<VipAnswer> list1 = new ArrayList<VipAnswer>( list.size() );
        for ( QuestionAnswerItemDto questionAnswerItemDto : list ) {
            list1.add( dtoToVipAnswer( questionAnswerItemDto ) );
        }
 
        return list1;
    }
}