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:

  1. examineBasic: The object to be converted.
  2. activityId: The value to be mapped to the activityId property of the ExamineBasicEntity object.
  3. tenantId: The value to be mapped to the tenantId property of the ExamineBasicEntity object.
  4. newLocalDateTime: The value to be mapped to both the createTime and updateTime properties of the ExamineBasicEntity object.

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

mapstruct Mappingtarget = activityId source = activityId Mappingtarget = tenantId source = tenantId Mappingtarget = createTime source = newLocalDateTime Mappingtarget = updateTime source

原文地址: http://www.cveoy.top/t/topic/iFfg 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录