jyy
2021-01-26 2c25c956ee0dc781500c70c7479c36f8b58f3445
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
package com.matrix.system.app.mapper;
 
import com.matrix.system.app.dto.QuestionAnswerDto;
import com.matrix.system.app.dto.QuestionAnswerItemDto;
import com.matrix.system.app.vo.QuestionVo;
import com.matrix.system.hive.bean.Question;
import com.matrix.system.hive.bean.VipAnswer;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
 
import java.util.List;
 
/**
 * @author wzy
 * @date 2020-12-28
 **/
@Mapper
public abstract class QuestionMapper {
    public static final QuestionMapper INSTANCE = Mappers.getMapper(QuestionMapper.class);
 
    public abstract QuestionVo entityToVo(Question question);
 
    public abstract List<QuestionVo> entitiesToVos(List<Question> list);
 
    @Mapping(source = "questionId", target = "quesionId")
    public abstract VipAnswer dtoToVipAnswer(QuestionAnswerItemDto questionAnswerDto);
 
    public abstract List<VipAnswer> dtosToVipAnswers(List<QuestionAnswerItemDto> list);
 
}