This commit is contained in:
2025-07-29 21:54:02 +08:00
parent 86d849c444
commit 6a11faaf9a

View File

@ -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);
}