id转换
This commit is contained in:
@ -3,6 +3,8 @@ package com.sczx.car.convert;
|
||||
import com.sczx.car.dto.CarModelSimpleDTO;
|
||||
import com.sczx.car.po.CarModelPO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@Mapper
|
||||
@ -10,5 +12,9 @@ public interface CarModelConvert {
|
||||
CarModelConvert INSTANCE = Mappers.getMapper(CarModelConvert.class);
|
||||
|
||||
CarModelPO simpleDtoToPO(CarModelSimpleDTO dto);
|
||||
|
||||
@Mappings({
|
||||
@Mapping(source = "po.id", target = "carModelId")
|
||||
})
|
||||
CarModelSimpleDTO poToSimpleDTO(CarModelPO po);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user