mapstruct Mappingtarget = activityId source = activityId Mappingtarget = tenantId source = tenantId Mappingtarget = createTime source = newLocalDateTime Mappingtarget = updateTime source
This is a method that uses MapStruct to convert a given object of type T (which must extend BaseExamineBasicVO) to an ExamineBasicEntity object. The method takes several parameters:
examineBasic: The object to be converted.activityId: The value to be mapped to theactivityIdproperty of theExamineBasicEntityobject.tenantId: The value to be mapped to thetenantIdproperty of theExamineBasicEntityobject.newLocalDateTime: The value to be mapped to both thecreateTimeandupdateTimeproperties of theExamineBasicEntityobject.
The @Mapping annotations indicate how to map the properties from the source object to the target object. In this case, the activityId property is mapped from the activityId source, the tenantId property is mapped from the tenantId source, and both the createTime and updateTime properties are mapped from the newLocalDateTime source.
The method returns the converted ExamineBasicEntity object
原文地址: http://www.cveoy.top/t/topic/iFfg 著作权归作者所有。请勿转载和采集!