All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arextest.schedule.model.converter.ReplayBizLogConverter Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package com.arextest.schedule.model.converter;

import com.arextest.schedule.model.bizlog.BizLog;
import com.arextest.schedule.model.dao.mongodb.ReplayBizLogCollection;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * Created by qzmo on 2023/5/31.
 */
@Mapper
public interface ReplayBizLogConverter {

  ReplayBizLogConverter INSTANCE = Mappers.getMapper(ReplayBizLogConverter.class);

  @Mappings({
      @Mapping(target = "id", expression = "java(null)"),
      @Mapping(target = "dataChangeCreateTime", expression = "java(System.currentTimeMillis())"),
      @Mapping(target = "dataChangeUpdateTime", expression = "java(System.currentTimeMillis())"),
      @Mapping(target = "dataChangeCreateDate", expression = "java(new java.util.Date())")
  })
  ReplayBizLogCollection daoFromDto(BizLog dto);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy