提交 1cc13274 编写于 作者: zhouweidong's avatar zhouweidong

索引实体

上级 75eab7e7
<#ibiztemplate>
TARGET=PSDATAENTITY
</#ibiztemplate>
<#comment>索引从实体</#comment>
<#assign isIndexSubDE=false>
<#if de.getMinorPSDERs()??>
<#list de.getMinorPSDERs() as MinorPSDER>
<#if MinorPSDER.getDERType()?? && MinorPSDER.getDERType()=="DERINDEX">
<#assign isIndexSubDE=true>
<#assign indexPSDER=MinorPSDER>
<#break>
</#if>
</#list>
<#if isIndexSubDE=true && indexPSDER??>
<#comment>索引主实体</#comment>
<#assign indexMajorDE=indexPSDER.getMajorPSDataEntity()>
<#assign indexMajorDECodeName=indexPSDER.getMajorPSDataEntity().codeName>
<#assign indexMajorDECodeNameCamel = srfcaseformat(indexMajorDECodeName,'l_u2lC')?cap_first>
<#assign deCodeName=de.codeName>
<#assign deCodeNameCamel = srfcaseformat(deCodeName,'l_u2lC')?cap_first>
package ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.mapping.${de.codeName}InheritMapping;
import org.mapstruct.*;
import ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower_case}.domain.${de.codeName};
import ${pub.getPKGCodeName()}.core.${indexMajorDE.getPSSystemModule().getCodeName()?lower_case}.domain.${indexMajorDE.codeName};
import ${pub.getPKGCodeName()}.util.domain.MappingBase;
import org.mapstruct.factory.Mappers;
import java.util.List;
@Mapper(componentModel = "spring", uses = {},
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface ${item.getCodeName()}Mapping extends MappingBase<${item.codeName}, ${isIndexSubDE.codeName}> {
@Mappings({
<#if indexPSDER.getPropertyMapNames?? && indexPSDER.getPropertyMapNames()??>
<#list indexPSDER.getPropertyMapNames as indexFieldMapping>
//${indexFieldMapping}
<#--@Mapping(source ="humanname" ,target = "cityname"), //平台配置参数映射-->
<#--@Mapping(source ="humanname" ,target = "cityname") //主键-->
</#list>
</#if>
})
${indexMajorDECodeName} to${indexMajorDECodeNameCamel}(${deCodeName} ${deCodeName?lower_case});
${deCodeName} to${deCodeNameCamel}(${indexMajorDECodeName} ${indexMajorDECodeName?lower_case});
List<${indexMajorDECodeName}> to${indexMajorDECodeNameCamel}(List<${deCodeName}> ${deCodeName?lower_case});
List<${deCodeName}> to${deCodeNameCamel}(List<${indexMajorDECodeName}> ${indexMajorDECodeName?lower_case});
}
</#if>
</#if>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册