提交 9b54d506 编写于 作者: zhouweidong's avatar zhouweidong

mapping别名:解决实体在多服务接口中,boot启动mapping重名问题

上级 c054a960
...@@ -5,6 +5,8 @@ TARGET=PSDESERVICEAPI ...@@ -5,6 +5,8 @@ TARGET=PSDESERVICEAPI
<#if de.isSubSysDE()==false && de.getAllPSDEServiceAPIs()??> <#if de.isSubSysDE()==false && de.getAllPSDEServiceAPIs()??>
<#assign pubPkgCodeName = pub.getPKGCodeName()> <#assign pubPkgCodeName = pub.getPKGCodeName()>
<#assign itemSysApiCodeNameLC = item.getPSSysServiceAPI().getCodeName()?lower_case> <#assign itemSysApiCodeNameLC = item.getPSSysServiceAPI().getCodeName()?lower_case>
<#assign itemSysApiCodeName = item.getPSSysServiceAPI().getCodeName()>
<#assign mappingName=itemSysApiCodeName+item.codeName+"Mapping">
package ${pubPkgCodeName}.${itemSysApiCodeNameLC}.mapping; package ${pubPkgCodeName}.${itemSysApiCodeNameLC}.mapping;
import org.mapstruct.*; import org.mapstruct.*;
...@@ -13,7 +15,7 @@ import ${pubPkgCodeName}.${itemSysApiCodeNameLC}.dto.${item.getCodeName()}DTO; ...@@ -13,7 +15,7 @@ import ${pubPkgCodeName}.${itemSysApiCodeNameLC}.dto.${item.getCodeName()}DTO;
import ${pub.getPKGCodeName()}.util.domain.MappingBase; import ${pub.getPKGCodeName()}.util.domain.MappingBase;
import org.mapstruct.factory.Mappers; import org.mapstruct.factory.Mappers;
@Mapper(componentModel = "spring", uses = {}, @Mapper(componentModel = "spring", uses = {},implementationName="${mappingName}",
nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE,
nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS) nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface ${item.getCodeName()}Mapping extends MappingBase<${item.codeName}DTO, ${de.codeName}> { public interface ${item.getCodeName()}Mapping extends MappingBase<${item.codeName}DTO, ${de.codeName}> {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册