| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- package com.persagy.fm.profession.model;
- import org.mapstruct.*;
- import org.mapstruct.MappingTarget;
- import org.mapstruct.factory.Mappers;
- import com.persagy.fm.profession.model.vo.*;
- import com.persagy.fm.profession.model.dto.*;
- import java.util.List;
- /**
- * 专业(Profession) dto、vo、do转换工具类
- *
- * @author lixing
- * @version V1.0 2021-03-19 16:38:21 2021-03-19 16:38:21
- */
- @Mapper(nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT,
- nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
- public interface ConvertProfessionTool {
- ConvertProfessionTool INSTANCE = Mappers.getMapper(ConvertProfessionTool.class);
- /**
- * do转换为ResponseItemVO
- *
- * @param profession do对象
- * @return ResponseItemVO
- * @author lixing
- * @version V1.0 2021-03-19 16:38:21
- */
- ResponseProfessionItemVO convert2ResponseItemDTO(Profession profession);
- /**
- * do转换为ResponseListItemVO
- *
- * @param profession do对象
- * @return ResponseListItemVO
- * @author lixing
- * @version V1.0 2021-03-19 16:38:21
- */
- ResponseProfessionListItemVO convert2ResponseListItemDTO(Profession profession);
- /**
- * do列表转换为ResponseListItemVO列表
- *
- * @param professionList do列表
- * @return ResponseListItemVO列表
- * @author lixing
- * @version V1.0 2021-03-19 16:38:21
- */
- List<ResponseProfessionListItemVO> convert2List(List<Profession> professionList);
- /**
- * addDTO转换为do
- *
- * @param addProfessionDTO addDTO
- * @return 要创建的do对象
- * @author lixing
- * @version V1.0 2021-03-19 16:38:21
- */
- Profession convertAddDto2Entity(AddProfessionDTO addProfessionDTO);
- /**
- * updateDTO转换为实体
- *
- * @param profession 更新前的do对象
- * @param updateProfessionDTO updateDTO
- * @return 更新后的do对象
- * @author lixing
- * @version V1.0 2021-03-19 16:38:21
- */
- Profession convertUpdateDto2Entity(@MappingTarget Profession profession, UpdateProfessionDTO updateProfessionDTO);
- }
|