提交 1b8b4e40 编写于 作者: tangyaolong's avatar tangyaolong

驼峰命名开关

上级 86fe24b8
......@@ -59,7 +59,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
<#assign defDataType = (defield.getDataType())!"">
<#if defDataType!='ONE2MANYDATA'>
<#assign columnname = defield.getName()?lower_case>
<#assign prvateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign prvateCodeName = srfr7templcaseformat(defield.getCodeName()) >
<#assign publicCodeName = prvateCodeName?cap_first >
<#assign jsonfield = defield.getCodeName()?lower_case >
<#assign tablefieldano = "value = \""+columnname+"\"" >
......@@ -124,7 +124,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
<#assign defieldano = defieldano+", ">
</#if>
<#if defield.getDupCheckPSDEField?? && defield.getDupCheckPSDEField()??>
<#assign dupCheckField = srfcaseformat(defield.getDupCheckPSDEField().getCodeName(),'l_u2lC') >
<#assign dupCheckField = srfr7templcaseformat(defield.getDupCheckPSDEField().getCodeName()) >
<#assign defieldano=defieldano+"dupCheck = DupCheck.ALL, dupCheckField = \""+dupCheckField+"\"">
<#else>
<#assign defieldano=defieldano+"dupCheck = DupCheck.ALL" >
......@@ -196,7 +196,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
@JsonIgnore
@JSONField(serialize = false)
@TableField(exist = false)
private ${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()} ${srfcaseformat(MinorPSDER.getCodeName(),'l_u2lC')};
private ${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()} ${srfr7templcaseformat(MinorPSDER.getCodeName())};
</#if>
</#if>
......@@ -210,7 +210,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
<#if der.getDERType() =='DER1N' >
<#assign listcode=(der.getMinorCodeName()!der.getMinorPSDataEntity().getCodeName())>
<#if listcode?? && listcode==''><#assign listcode=der.getMinorPSDataEntity().getCodeName()></#if>
<#assign columnname=srfcaseformat(listcode,'l_u2lC')>
<#assign columnname=srfr7templcaseformat(listcode)>
<#assign subDTOs = srfpluralize(listcode)?lower_case >
<#assign nested=der.isNestedRS()>
<#if nested == false && der.getMinorPSDataEntity().getAllPSDEServiceAPIs()??>
......@@ -238,15 +238,15 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
@JSONField(serialize = false)
@TableField(exist = false)
</#if>
private List<${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.domain.${der.getMinorPSDataEntity().getCodeName()}> ${srfcaseformat(listcode,'l_u2lC')};
private List<${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.domain.${der.getMinorPSDataEntity().getCodeName()}> ${srfr7templcaseformat(listcode)};
<#if der.getMinorPSDataEntity().getStorageMode()==0 && der.getPSOne2ManyDataDEField()?? && der.getPSOne2ManyDataDEField().isPhisicalDEField()==true>
/**
* 设置 [${der.getMinorPSDataEntity().getLogicName()}]
*/
public void set${srfcaseformat(listcode,'l_u2lC')?cap_first}(List<${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.domain.${der.getMinorPSDataEntity().getCodeName()}> ${srfcaseformat(listcode,'l_u2lC')}) {
this.${srfcaseformat(listcode,'l_u2lC')} = ${srfcaseformat(listcode,'l_u2lC')};
this.modify("${columnname}", (${srfcaseformat(listcode,'l_u2lC')}!=null)?${srfcaseformat(listcode,'l_u2lC')}:(new ArrayList()));
public void set${srfr7templcaseformat(listcode)?cap_first}(List<${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.domain.${der.getMinorPSDataEntity().getCodeName()}> ${srfr7templcaseformat(listcode)}) {
this.${srfr7templcaseformat(listcode)} = ${srfr7templcaseformat(listcode)};
this.modify("${columnname}", (${srfr7templcaseformat(listcode)}!=null)?${srfr7templcaseformat(listcode)}:(new ArrayList()));
}
</#if>
</#if>
......@@ -258,7 +258,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
<#list de.getPSDEFields() as defield>
<#assign defDataType = (defield.getDataType())!"">
<#assign columnname = defield.getName()?lower_case>
<#assign prvateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign prvateCodeName = srfr7templcaseformat(defield.getCodeName()) >
<#assign publicCodeName = prvateCodeName?cap_first >
<#assign jsonfield = defield.getCodeName()?lower_case >
<#assign defieldIsDate=false>
......@@ -304,7 +304,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
<#comment>联合主键</#comment>
<#assign keyField = item.getKeyPSDEField()>
<#if item.getUnionKeyValuePSDEFields()??>
<#assign prvateCodeName = srfcaseformat(keyField.getCodeName(),'l_u2lC') >
<#assign prvateCodeName = srfr7templcaseformat(keyField.getCodeName()) >
<#assign publicCodeName = prvateCodeName?cap_first >
<#if keyField.isPhisicalDEField()==false>
<#comment>虚拟联合主键</#comment>
......@@ -329,7 +329,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
if(args.length == ${unionKeySize}){
${checkUnionKey2(item.getUnionKeyValuePSDEFields())} {
<#list item.getUnionKeyValuePSDEFields() as defield>
<#assign unionKeyPrivateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign unionKeyPrivateCodeName = srfr7templcaseformat(defield.getCodeName()) >
<#assign unionKeyPublicCodeName = unionKeyPrivateCodeName?cap_first >
this.set("${unionKeyPrivateCodeName}", args[${defield_index}]);
</#list>
......@@ -426,7 +426,7 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable {
<#assign defDataType = (defield.getDataType())!"">
<#if defDataType!='ONE2MANYDATA'>
<#assign columnname = defield.getName()?lower_case>
<#assign prvateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign prvateCodeName = srfr7templcaseformat(defield.getCodeName()) >
<#assign publicCodeName = prvateCodeName?cap_first >
<#assign jsonfield = defield.getCodeName()?lower_case >
<#assign defieldano = "" >
......@@ -508,7 +508,7 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable {
@JsonIgnore
@JSONField(serialize = false)
@Transient
private ${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()} ${srfcaseformat(MinorPSDER.getCodeName(),'l_u2lC')};
private ${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()} ${srfr7templcaseformat(MinorPSDER.getCodeName())};
</#if>
</#if>
......@@ -541,14 +541,14 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable {
<#if der.getPSOne2ManyDataDEField()??>
@Field(name = "${der.getPSOne2ManyDataDEField().getName()?lower_case}"
<#else >
@Field(name = "${srfcaseformat(listcode,'l_u2lC')}")
@Field(name = "${srfr7templcaseformat(listcode)}")
</#if>
<#else >
@JsonIgnore
@JSONField(serialize = false)
@Transient
</#if>
private List<${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.domain.${der.getMinorPSDataEntity().getCodeName()}> ${srfcaseformat(listcode,'l_u2lC')};
private List<${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.domain.${der.getMinorPSDataEntity().getCodeName()}> ${srfr7templcaseformat(listcode)};
</#if>
</#if>
......@@ -559,7 +559,7 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable {
<#assign keyField = item.getKeyPSDEField()>
<#comment>联合主键</#comment>
<#if item.getUnionKeyValuePSDEFields()??>
<#assign privateCodeName = srfcaseformat(keyField.getCodeName(),'l_u2lC') >
<#assign privateCodeName = srfr7templcaseformat(keyField.getCodeName()) >
<#assign publicCodeName = privateCodeName?cap_first >
/**
* 获取 [${keyField.getLogicName()}]
......@@ -598,7 +598,7 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
<#assign defDataType = (defield.getDataType())!"">
<#if defDataType!='ONE2MANYDATA'>
<#assign columnname = defield.getName()?lower_case>
<#assign prvateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign prvateCodeName = srfr7templcaseformat(defield.getCodeName()) >
<#assign publicCodeName = prvateCodeName?cap_first >
<#assign jsonfield = defield.getCodeName()?lower_case >
<#if de.getStorageMode()==0><#assign jsonfield = defield.getCodeName()?uncap_first ></#if>
......@@ -672,9 +672,9 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
/**
* ${MinorPSDER.getLogicName()}
*/
@JSONField(name = "${srfcaseformat(MinorPSDER.getCodeName(),'l_u2lC')?lower_case}")
@JsonProperty("${srfcaseformat(MinorPSDER.getCodeName(),'l_u2lC')?lower_case}")
private ${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()} ${srfcaseformat(MinorPSDER.getCodeName(),'l_u2lC')};
@JSONField(name = "${srfr7templcaseformat(MinorPSDER.getCodeName())?lower_case}")
@JsonProperty("${srfr7templcaseformat(MinorPSDER.getCodeName())?lower_case}")
private ${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()} ${srfr7templcaseformat(MinorPSDER.getCodeName())};
</#if>
</#if>
......@@ -703,7 +703,7 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
*/
@JSONField(name = "${subDTOs}")
@JsonProperty("${subDTOs}")
private List<${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.domain.${der.getMinorPSDataEntity().getCodeName()}> ${srfcaseformat(listcode,'l_u2lC')};
private List<${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.domain.${der.getMinorPSDataEntity().getCodeName()}> ${srfr7templcaseformat(listcode)};
</#if>
</#if>
......@@ -715,7 +715,7 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
<#list de.getPSDEFields() as defield>
<#assign defDataType = (defield.getDataType())!"">
<#assign columnname = defield.getName()?lower_case>
<#assign prvateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign prvateCodeName = srfr7templcaseformat(defield.getCodeName()) >
<#assign publicCodeName = prvateCodeName?cap_first >
<#assign jsonfield = defield.getCodeName()?lower_case >
<#assign defieldIsDate=false>
......@@ -808,7 +808,7 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
<#assign defDataType = (defield.getDataType())!"">
<#if defDataType!='ONE2MANYDATA'>
<#assign columnname = defield.getName()?lower_case>
<#assign prvateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign prvateCodeName = srfr7templcaseformat(defield.getCodeName()) >
<#assign publicCodeName = prvateCodeName?cap_first >
<#assign jsonfield = defield.getCodeName()?lower_case >
<#if de.getStorageMode()==0><#assign jsonfield = defield.getCodeName()?uncap_first ></#if>
......@@ -882,9 +882,9 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
/**
* ${MinorPSDER.getLogicName()}
*/
@JSONField(name = "${srfcaseformat(MinorPSDER.getCodeName(),'l_u2lC')?lower_case}")
@JsonProperty("${srfcaseformat(MinorPSDER.getCodeName(),'l_u2lC')?lower_case}")
private ${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()} ${srfcaseformat(MinorPSDER.getCodeName(),'l_u2lC')};
@JSONField(name = "${srfr7templcaseformat(MinorPSDER.getCodeName())?lower_case}")
@JsonProperty("${srfr7templcaseformat(MinorPSDER.getCodeName())?lower_case}")
private ${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()} ${srfr7templcaseformat(MinorPSDER.getCodeName())};
</#if>
</#if>
......@@ -913,7 +913,7 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
*/
@JSONField(name = "${subDTOs}")
@JsonProperty("${subDTOs}")
private List<${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.domain.${der.getMinorPSDataEntity().getCodeName()}> ${srfcaseformat(listcode,'l_u2lC')};
private List<${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.domain.${der.getMinorPSDataEntity().getCodeName()}> ${srfr7templcaseformat(listcode)};
</#if>
</#if>
......@@ -923,7 +923,7 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
<#list de.getPSDEFields() as defield>
<#assign defDataType = (defield.getDataType())!"">
<#assign columnname = defield.getName()?lower_case>
<#assign prvateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign prvateCodeName = srfr7templcaseformat(defield.getCodeName()) >
<#assign publicCodeName = prvateCodeName?cap_first >
<#assign jsonfield = defield.getCodeName()?lower_case >
<#assign defieldIsDate=false>
......@@ -967,7 +967,7 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
<#assign formatValue="">
<#list item.getUnionKeyValuePSDEFields() as defield>
<#assign dataType = (defield.getDataType())!"">
<#assign unionKeyPrivateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign unionKeyPrivateCodeName = srfr7templcaseformat(defield.getCodeName()) >
<#assign unionKeyPublicCodeName = unionKeyPrivateCodeName?cap_first >
<#assign formatKey=formatKey+"%s">
<#if defield_has_next>
......@@ -990,7 +990,7 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
<#function checkUnionKey unionKeyList>
<#assign formatValue="">
<#list item.getUnionKeyValuePSDEFields() as defield>
<#assign unionKeyPrivateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign unionKeyPrivateCodeName = srfr7templcaseformat(defield.getCodeName()) >
<#assign unionKeyPublicCodeName = unionKeyPrivateCodeName?cap_first >
<#assign formatValue=formatValue+"(!ObjectUtils.isEmpty(this.get"+unionKeyPublicCodeName+"()))">
<#if defield_has_next>
......@@ -1014,8 +1014,14 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
<#return unionKeyResult>
</#function>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -33,7 +33,7 @@ public interface ${item.getCodeName()}Mapper extends BaseMapper<${item.getCodeNa
Page<<#if dedataset.isEnableGroup()>Map<#else>${item.getCodeName()}</#if>> search${dedataset.getCodeName()}(IPage page, @Param("srf") ${de.codeName}SearchContext context, @Param("ew") Wrapper<${item.getCodeName()}> wrapper);
</#list>
</#if>
<#assign keyfieldCodeName=srfcaseformat(item.getKeyPSDEField().codeName,'l_u2lC')>
<#assign keyfieldCodeName=srfr7templcaseformat(item.getKeyPSDEField().codeName)>
@Override
<#if item.isEnableEntityCache()==true>
@Cacheable(value ="${item.codeName?lower_case}", key = "'row:'+#p0")
......@@ -104,7 +104,7 @@ public interface ${item.getCodeName()}Mapper extends BaseMapper<${item.getCodeNa
<#if de.getDefaultPSDEDataSet()??>
<#assign deDefaultDataSet=de.getDefaultPSDEDataSet()>
<#if deDefaultDataSet.getPSDEDataQueries()??>
List<${item.getCodeName()}> selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(@Param("${MajorkeyField.codeName?lower_case}") Serializable ${MajorkeyField.codeName?lower_case});
List<${item.getCodeName()}> selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(@Param("${MajorkeyField.codeName?lower_case}") Serializable ${MajorkeyField.codeName?lower_case});
</#if>
</#if>
......@@ -115,4 +115,16 @@ public interface ${item.getCodeName()}Mapper extends BaseMapper<${item.getCodeNa
</#list>
</#if>
}
</#if>
\ No newline at end of file
</#if>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -9,13 +9,13 @@ import java.util.List;
@Mapper(componentModel = "spring", uses = {})
public interface ${de.codeName}${item.codeName} {
<#assign keyFieldName=srfcaseformat(de.getKeyPSDEField().getCodeName(),'l_u2lC')>
<#assign keyFieldName=srfr7templcaseformat(de.getKeyPSDEField().getCodeName())>
<#if item.getPSDEDataImportItems?? && item.getPSDEDataImportItems()??>
@Mappings({
@Mapping(target = "${keyFieldName}", source = "${keyFieldName}"),
<#list item.getPSDEDataImportItems() as importItem>
<#if importItem.getPSDEField()?? && importItem.getPSDEField().isKeyDEField()==false>
<#assign deFieldName = srfcaseformat(importItem.getPSDEField().getCodeName(),'l_u2lC')>
<#assign deFieldName = srfr7templcaseformat(importItem.getPSDEField().getCodeName())>
@Mapping(target = "${deFieldName}", source = "${deFieldName}"),
</#if>
</#list>
......@@ -27,6 +27,14 @@ public interface ${de.codeName}${item.codeName} {
List<${de.codeName}> toDomain(List<${de.codeName}> entities);
}
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -23,13 +23,13 @@ TARGET=PSDATAENTITY
<#comment>索引主实体</#comment>
<#assign majorIndexDE=indexPSDER.getMajorPSDataEntity()>
<#assign majorIndexDECodeName=indexPSDER.getMajorPSDataEntity().codeName>
<#assign majorIndexDECodeNameCamel = srfcaseformat(majorIndexDECodeName,'l_u2lC')?cap_first>
<#assign majorIndexDEKeyFieldCodeName=srfcaseformat(majorIndexDE.getKeyPSDEField().codeName,'l_u2lC')>
<#assign majorIndexDEMajorTextFieldCodeName=srfcaseformat(majorIndexDE.getMajorPSDEField().codeName,'l_u2lC')>
<#assign majorIndexDECodeNameCamel = srfr7templcaseformat(majorIndexDECodeName)?cap_first>
<#assign majorIndexDEKeyFieldCodeName=srfr7templcaseformat(majorIndexDE.getKeyPSDEField().codeName)>
<#assign majorIndexDEMajorTextFieldCodeName=srfr7templcaseformat(majorIndexDE.getMajorPSDEField().codeName)>
<#assign MinorIndexDECodeName=de.codeName>
<#assign MinorIndexDECodeNameCamel = srfcaseformat(MinorIndexDECodeName,'l_u2lC')?cap_first>
<#assign MinorIndexDEKeyFieldCodeName=srfcaseformat(de.getKeyPSDEField().codeName,'l_u2lC')>
<#assign MinorIndexDEMajorTextFieldCodeName=srfcaseformat(de.getMajorPSDEField().codeName,'l_u2lC')>
<#assign MinorIndexDECodeNameCamel = srfr7templcaseformat(MinorIndexDECodeName)?cap_first>
<#assign MinorIndexDEKeyFieldCodeName=srfr7templcaseformat(de.getKeyPSDEField().codeName)>
<#assign MinorIndexDEMajorTextFieldCodeName=srfr7templcaseformat(de.getMajorPSDEField().codeName)>
package ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.mapping;
......@@ -53,7 +53,7 @@ public interface ${de.codeName}InheritMapping {
<#assign MinorDEField=indexFieldmapping.getMinorPSDEField()>
<#if majorDEField.isKeyDEField()==false && MinorDEField.isKeyDEField()==false && majorDEField.isMajorDEField()==false && MinorDEField.isMajorDEField()==false>
<#if !P.exists(MinorDEField.codeName,majorDEField.codeName)>
@Mapping(source ="${srfcaseformat(MinorDEField.codeName,'l_u2lC')}",target = "${srfcaseformat(majorDEField.codeName,'l_u2lC')}"),
@Mapping(source ="${srfr7templcaseformat(MinorDEField.codeName)}",target = "${srfr7templcaseformat(majorDEField.codeName)}"),
</#if>
</#if>
</#if>
......@@ -74,7 +74,7 @@ public interface ${de.codeName}InheritMapping {
<#assign MinorDEField=indexFieldmapping.getMinorPSDEField()>
<#if majorDEField.isKeyDEField()==false && MinorDEField.isKeyDEField()==false && majorDEField.isMajorDEField()==false && MinorDEField.isMajorDEField()==false>
<#if !P.exists(majorDEField.codeName,MinorDEField.codeName)>
@Mapping(source ="${srfcaseformat(majorDEField.codeName,'l_u2lC')}",target = "${srfcaseformat(MinorDEField.codeName,'l_u2lC')}"),
@Mapping(source ="${srfr7templcaseformat(majorDEField.codeName)}",target = "${srfr7templcaseformat(MinorDEField.codeName)}"),
</#if>
</#if>
</#if>
......@@ -91,4 +91,14 @@ public interface ${de.codeName}InheritMapping {
</#if>
</#if>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
<#ibiztemplate>
TARGET=PSDATAENTITY
</#ibiztemplate>
<#assign deCodeNameCamel = srfcaseformat(de.codeName,'l_u2lC')?cap_first>
<#assign deCodeNameCamel = srfr7templcaseformat(de.codeName)?cap_first>
<#comment>实体是否配置预置属性</#comment>
<#assign hasDEPrefield=false>
<#if de.getPSDEFieldByPDT('ORGID',true)?? || de.getPSDEFieldByPDT('ORGSECTORID',true)?? || de.getPSDEFieldByPDT('CREATEMAN',true)?? >
......@@ -182,25 +182,25 @@ public interface I${item.codeName}Service {
<#if de.getDefaultPSDEDataSet()??>
<#assign deDefaultDataSet=de.getDefaultPSDEDataSet()>
<#if deDefaultDataSet.getPSDEDataQueries()??>
List<${item.getCodeName()}> selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case});
List<${item.getCodeName()}> selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case});
<#comment>主实体关联实体行为</#comment>
<#if MinorPSDER.getRemoveActionType()??>
<#if MinorPSDER.getRemoveActionType()?c=='3'><#comment>限制删除</#comment>
List<${item.getCodeName()}> selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids);
List<${item.getCodeName()}> selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids);
<#elseif MinorPSDER.getRemoveActionType()?c=='2'><#comment>置空</#comment>
void resetBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case});
void resetBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids);
void resetBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case});
void resetBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids);
<#elseif MinorPSDER.getRemoveActionType()?c=='1'><#comment>同时删除</#comment>
<#if item.isEnableEntityCache()==true>
@CacheEvict(value = "${item.codeName?lower_case}", allEntries = true)
</#if>
void removeBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids);
void removeBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids);
</#if>
</#if>
<#if item.isEnableEntityCache()==true>
@CacheEvict(value = "${item.codeName?lower_case}", allEntries = true)
</#if>
void removeBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case});
void removeBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case});
<#assign nested=MinorPSDER.isNestedRS()>
<#if nested == false && MinorPSDER.getMinorPSDataEntity().getAllPSDEServiceAPIs()??>
<#list MinorPSDER.getMinorPSDataEntity().getAllPSDEServiceAPIs() as api>
......@@ -213,7 +213,7 @@ public interface I${item.codeName}Service {
<#if item.isEnableEntityCache()==true>
@CacheEvict(value = "${item.codeName?lower_case}", allEntries = true)
</#if>
void saveBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}, List<${item.getCodeName()}> list) ;
void saveBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}, List<${item.getCodeName()}> list) ;
</#if>
</#if>
</#if>
......@@ -274,4 +274,16 @@ public interface I${item.codeName}Service {
</#if>
</#macro>
</#if>
\ No newline at end of file
</#if>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
<#ibiztemplate>
TARGET=PSDATAENTITY
</#ibiztemplate>
<#assign deCodeNameCamel = srfcaseformat(de.codeName,'l_u2lC')?cap_first>
<#assign deCodeNameCamel = srfr7templcaseformat(de.codeName)?cap_first>
<#comment>实体是否配置预置属性</#comment>
<#assign hasDEPrefield=false>
<#if de.getPSDEFieldByPDT('ORGID',true)?? || de.getPSDEFieldByPDT('ORGSECTORID',true)?? || de.getPSDEFieldByPDT('CREATEMAN',true)?? >
......@@ -49,7 +49,7 @@ TARGET=PSDATAENTITY
<#assign indexPSDER=MinorPSDER>
<#assign majorIndexDE=indexPSDER.getMajorPSDataEntity()>
<#assign majorIndexDECodeName=indexPSDER.getMajorPSDataEntity().codeName>
<#assign majorIndexDECodeNameCamel = srfcaseformat(majorIndexDECodeName,'l_u2lC')?cap_first>
<#assign majorIndexDECodeNameCamel = srfr7templcaseformat(majorIndexDECodeName)?cap_first>
<#if MinorPSDER.getDERType()=="DERINHERIT" && MinorPSDER.isLogicInherit()>
<#assign isLogicInheritDE=true>
</#if>
......@@ -88,7 +88,7 @@ TARGET=PSDATAENTITY
</#if>
<#assign isDupCheck=isDupCheckEntity(de)>
<#assign keyfield=de.getKeyPSDEField()>
<#assign keyfieldPrivateCodeName = srfcaseformat(keyfield.getCodeName(),'l_u2lC') >
<#assign keyfieldPrivateCodeName = srfr7templcaseformat(keyfield.getCodeName()) >
<#assign keyfieldPublicCodeName = keyfieldPrivateCodeName?cap_first >
package ${pub.getPKGCodeName()}.core.${item.getPSSystemModule().getCodeName()?lower_case}.service.impl;
......@@ -152,11 +152,11 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<#if !P.exists('DER1N',der.getMinorPSDataEntity().getCodeName())>
<#if der.getMinorPSDataEntity().getCodeName()==de.codeName>
protected ${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMinorPSDataEntity().getCodeName()}Service ${srfcaseformat(der.getMinorPSDataEntity().getCodeName(),'l_u2lC')}Service = this;
protected ${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMinorPSDataEntity().getCodeName()}Service ${srfr7templcaseformat(der.getMinorPSDataEntity().getCodeName())}Service = this;
<#else>
@Autowired
@Lazy
protected ${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMinorPSDataEntity().getCodeName()}Service ${srfcaseformat(der.getMinorPSDataEntity().getCodeName(),'l_u2lC')}Service;
protected ${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMinorPSDataEntity().getCodeName()}Service ${srfr7templcaseformat(der.getMinorPSDataEntity().getCodeName())}Service;
</#if>
</#if>
</#if>
......@@ -169,11 +169,11 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<#if !P.exists('DER1N',der.getMajorPSDataEntity().getCodeName())>
<#if der.getMajorPSDataEntity().getCodeName()==de.codeName>
protected ${pub.getPKGCodeName()}.core.${der.getMajorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMajorPSDataEntity().getCodeName()}Service ${srfcaseformat(der.getMajorPSDataEntity().getCodeName(),'l_u2lC')}Service = this;
protected ${pub.getPKGCodeName()}.core.${der.getMajorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMajorPSDataEntity().getCodeName()}Service ${srfr7templcaseformat(der.getMajorPSDataEntity().getCodeName())}Service = this;
<#else>
@Autowired
@Lazy
protected ${pub.getPKGCodeName()}.core.${der.getMajorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMajorPSDataEntity().getCodeName()}Service ${srfcaseformat(der.getMajorPSDataEntity().getCodeName(),'l_u2lC')}Service;
protected ${pub.getPKGCodeName()}.core.${der.getMajorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMajorPSDataEntity().getCodeName()}Service ${srfr7templcaseformat(der.getMajorPSDataEntity().getCodeName())}Service;
</#if>
</#if>
</#if>
......@@ -273,7 +273,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
</#list>
</#if>
<#if nested>
et.set${srfcaseformat(listcode,'l_u2lC')?cap_first}(${srfcaseformat(MinorEntity.getCodeName(),'l_u2lC')}Service.selectBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(key));
et.set${srfr7templcaseformat(listcode)?cap_first}(${srfr7templcaseformat(MinorEntity.getCodeName())}Service.selectBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(key));
</#if>
</#if>
</#if>
......@@ -305,7 +305,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
createIndexMajorEntityData(et);
</#if>
<#if isLogicInheritDE>
if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("${keyfield.name?lower_case}", et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()))) {
if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("${keyfield.name?lower_case}", et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}()))) {
return false;
}
<#else>
......@@ -331,14 +331,14 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
</#list>
</#if>
<#if nested>
${srfcaseformat(MinorEntity.getCodeName(),'l_u2lC')}Service.saveBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(), et.get${srfcaseformat(listcode,'l_u2lC')?cap_first}());
${srfr7templcaseformat(MinorEntity.getCodeName())}Service.saveBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}(), et.get${srfr7templcaseformat(listcode)?cap_first}());
</#if>
</#if>
</#if>
</#list>
</#if>
<#comment>成功后get填充一次完整信息</#comment>
CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()), et);
CachedBeanCopier.copy(get(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}()), et);
<#if hasPSDERsMapping>
updateParentData(et);
</#if>
......@@ -391,7 +391,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<@addBoforeLogic deaction/>
<#comment>同步更新索引主实体、继承主实体数据:继承子实体属性来源与父,先保存父,再保存子,最后get一次获取父数据返回</#comment>
<#if isIndexSubDE>
${srfcaseformat(majorIndexDECodeName,'l_u2lC')}Service.update(${de.codeName?lower_case}InheritMapping.to${majorIndexDECodeNameCamel}(et));
${srfr7templcaseformat(majorIndexDECodeName)}Service.update(${de.codeName?lower_case}InheritMapping.to${majorIndexDECodeNameCamel}(et));
</#if>
<#if de.getKeyPSDEField()??>
<#if de.getKeyPSDEField().isPhisicalDEField()==false && de.getUnionKeyValuePSDEFields()??>
......@@ -400,7 +400,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
return false;
}
<#else>
if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("${keyfield.name?lower_case}", et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()))) {
if(!update(et, (Wrapper) et.getUpdateWrapper(true).eq("${keyfield.name?lower_case}", et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}()))) {
return false;
}
</#if>
......@@ -422,14 +422,14 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
</#list>
</#if>
<#if nested>
${srfcaseformat(MinorEntity.getCodeName(),'l_u2lC')}Service.saveBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(), et.get${srfcaseformat(listcode,'l_u2lC')?cap_first}());
${srfr7templcaseformat(MinorEntity.getCodeName())}Service.saveBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}(), et.get${srfr7templcaseformat(listcode)?cap_first}());
</#if>
</#if>
</#if>
</#list>
</#if>
<#comment>成功后get填充一次完整信息</#comment>
CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()), et);
CachedBeanCopier.copy(get(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}()), et);
<#if hasPSDERsMapping>
updateParentData(et);
</#if>
......@@ -531,7 +531,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<#if der.getDERType() =='DER1N' && der.isNestedRS() && der.getMinorPSDataEntity()?? && (der.getMinorPSDataEntity().getStorageMode()==1||der.getMinorPSDataEntity().getStorageMode()==2||der.getMinorPSDataEntity().getStorageMode()==4) >
<#assign MajorDerField = der.getPSPickupDEField()>
<#assign minorKeyField = der.getMinorPSDataEntity().getKeyPSDEField()>
${srfcaseformat(der.getMinorPSDataEntity().getCodeName(),'l_u2lC')}Service.removeBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(key) ;
${srfr7templcaseformat(der.getMinorPSDataEntity().getCodeName())}Service.removeBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(key) ;
</#if>
<#comment>主实体删除操作(同时删除、置空、限制删除)</#comment>
<@majorEntityRemove der/>
......@@ -539,7 +539,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
</#if>
<#comment>同步清除索引主实体数据</#comment>
<#if isIndexSubDE>
${srfcaseformat(majorIndexDECodeName,'l_u2lC')}Service.remove(key);
${srfr7templcaseformat(majorIndexDECodeName)}Service.remove(key);
</#if>
boolean result = removeById(key);
<#if hasPSDERsMapping>
......@@ -594,7 +594,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
public boolean checkKey(${item.getCodeName()} et) {
<#comment>输出测试行为</#comment>
<@outputTestAction deaction "checkkey"/>
return (!ObjectUtils.isEmpty(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}())) && (!Objects.isNull(this.getById(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}())));
return (!ObjectUtils.isEmpty(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}())) && (!Objects.isNull(this.getById(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}())));
}
<#comment>用户扩展新建、更新</#comment>
<#elseif deaction.getActionType()== "USERCREATE" || deaction.getActionType()== "USERUPDATE">
......@@ -647,13 +647,13 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<#assign deDefaultDataSet=de.getDefaultPSDEDataSet()>
<#if deDefaultDataSet.getPSDEDataQueries()??>
@Override
public List<${item.getCodeName()}> selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
return baseMapper.selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${MajorkeyField.codeName?lower_case});
public List<${item.getCodeName()}> selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
return baseMapper.selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${MajorkeyField.codeName?lower_case});
}
<#comment>主实体删除关联实体行为</#comment>
<@majorEntityRemove_RefAction_SqlStore MinorPSDER />
@Override
public void removeBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
public void removeBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
this.remove(new QueryWrapper<${item.getCodeName()}>().eq("${MajorField.getName()?lower_case}",${MajorkeyField.codeName?lower_case}));
}
......@@ -668,21 +668,21 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<#if nested>
<@autowiredProxyService/>
@Override
public void saveBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case},List<${item.getCodeName()}> list) {
public void saveBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case},List<${item.getCodeName()}> list) {
if(list==null)
return;
Set<${srfr7javatype(keyfield.stdDataType)}> delIds=new HashSet<${srfr7javatype(keyfield.stdDataType)}>();
List<${item.getCodeName()}> _update=new ArrayList<${item.getCodeName()}>();
List<${item.getCodeName()}> _create=new ArrayList<${item.getCodeName()}>();
for(${item.getCodeName()} before:selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}());
for(${item.getCodeName()} before:selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}());
}
for(${item.getCodeName()} sub:list) {
sub.set${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${MajorkeyField.codeName?lower_case});
if(ObjectUtils.isEmpty(sub.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}()))
sub.set${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}((${srfr7javatype(keyfield.stdDataType)})sub.getDefaultKey(true));
if(delIds.contains(sub.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}())) {
delIds.remove(sub.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}());
sub.set${srfr7templcaseformat(MajorField.codeName)?cap_first}(${MajorkeyField.codeName?lower_case});
if(ObjectUtils.isEmpty(sub.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}()))
sub.set${srfr7templcaseformat(keyfield.getCodeName())?cap_first}((${srfr7javatype(keyfield.stdDataType)})sub.getDefaultKey(true));
if(delIds.contains(sub.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}())) {
delIds.remove(sub.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}());
_update.add(sub);
}
else
......@@ -779,7 +779,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
private void fillWFParam(com.baomidou.mybatisplus.extension.plugins.pagination.Page<${item.getCodeName()}> pages, Map<String, Map<String, Object>> businesskeys) {
if (!ObjectUtils.isEmpty(businesskeys)) {
for (${item.getCodeName()} entity : pages.getRecords()) {
Object id = entity.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}();
Object id = entity.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}();
if (!ObjectUtils.isEmpty(id) && businesskeys.containsKey(id)) {
Map<String, Object> params = businesskeys.get(id);
for (Map.Entry<String, Object> entry : params.entrySet()) {
......@@ -822,9 +822,9 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
</#list>
<#if hasPickupData==true && MinorPSDER.getMajorPSDataEntity?? && MinorPSDER.getMajorPSDataEntity()?? && MinorPSDER.getCodeName?? && MinorPSDER.getCodeName()??>
<#assign MajorEntity = MinorPSDER.getMajorPSDataEntity()>
<#assign MajorEntityName=srfcaseformat(MinorPSDER.getCodeName(),'l_u2lC')>
<#assign MajorKeyFieldCodeName =srfcaseformat(MinorPSDER.getPSPickupDEField().codeName,'l_u2lC')?cap_first>
<#assign MajorEntityService=srfcaseformat(MinorPSDER.getMajorPSDataEntity().getCodeName(),'l_u2lC')+"Service">
<#assign MajorEntityName=srfr7templcaseformat(MinorPSDER.getCodeName())>
<#assign MajorKeyFieldCodeName =srfr7templcaseformat(MinorPSDER.getPSPickupDEField().codeName)?cap_first>
<#assign MajorEntityService=srfr7templcaseformat(MinorPSDER.getMajorPSDataEntity().getCodeName())+"Service">
//实体关系[${MinorPSDER.name}]
if(!ObjectUtils.isEmpty(et.get${MajorKeyFieldCodeName}())){
${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()} ${MajorEntityName}=et.get${MajorEntityName?cap_first}();
......@@ -836,8 +836,8 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<#comment>找出当前关系的外键值文本及附加数据字段</#comment>
<#list de.getAllPSDEFields() as defield>
<#if defield.getPSDER1N?? && defield.getPSDER1N()?? && defield.getPSDER1N().name==MinorPSDER.name && (((defield.getDataType())!'')!='PICKUP')>
<#assign minorFieldCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC')?cap_first >
<#assign majorFieldCodeName = srfcaseformat(defield.getRelatedPSDEField().getCodeName(),'l_u2lC')?cap_first >
<#assign minorFieldCodeName = srfr7templcaseformat(defield.getCodeName())?cap_first >
<#assign majorFieldCodeName = srfr7templcaseformat(defield.getRelatedPSDEField().getCodeName())?cap_first >
et.set${minorFieldCodeName}(${MajorEntityName}.get${majorFieldCodeName}());
</#if>
</#list>
......@@ -846,12 +846,12 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
// 父关系等价
<#assign marjorPPSDer1n=MinorPSDER.getMajorPPSDER1N()>
<#assign minorPPSDer1n=MinorPSDER.getMinorPPSDER1N()>
<#assign marjorkeyFieldCodeName=srfcaseformat(marjorPPSDer1n.getPSPickupDEField().codeName,'l_u2lC')?cap_first>
<#assign minorkeyFieldCodeName=srfcaseformat(minorPPSDer1n.getPSPickupDEField().codeName,'l_u2lC')?cap_first>
<#assign marjorkeyFieldCodeName=srfr7templcaseformat(marjorPPSDer1n.getPSPickupDEField().codeName)?cap_first>
<#assign minorkeyFieldCodeName=srfr7templcaseformat(minorPPSDer1n.getPSPickupDEField().codeName)?cap_first>
et.set${minorkeyFieldCodeName}(${MajorEntityName}.get${marjorkeyFieldCodeName}());
<#if marjorPPSDer1n.getPSPickupTextDEField()?? && minorPPSDer1n.getPSPickupTextDEField()??>
<#assign marjorPickupTextCodeName=srfcaseformat(marjorPPSDer1n.getPSPickupTextDEField().codeName,'l_u2lC')?cap_first>
<#assign minorPickupTextCodeName=srfcaseformat(minorPPSDer1n.getPSPickupTextDEField().codeName,'l_u2lC')?cap_first>
<#assign marjorPickupTextCodeName=srfr7templcaseformat(marjorPPSDer1n.getPSPickupTextDEField().codeName)?cap_first>
<#assign minorPickupTextCodeName=srfr7templcaseformat(minorPPSDer1n.getPSPickupTextDEField().codeName)?cap_first>
et.set${minorPickupTextCodeName}(${MajorEntityName}.get${marjorPickupTextCodeName}());
</#if>
</#if>
......@@ -873,16 +873,16 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<#if MinorPSDER?? && MinorPSDER.getDERType()=='DER1N' && (MinorPSDER.getMajorPSDataEntity().getStorageMode()==1||MinorPSDER.getMajorPSDataEntity().getStorageMode()==2||MinorPSDER.getMajorPSDataEntity().getStorageMode()==4)>
<#if MinorPSDER.getMajorPSDataEntity?? && MinorPSDER.getMajorPSDataEntity()?? && MinorPSDER.getCodeName?? && MinorPSDER.getCodeName()??>
<#assign MajorEntity = MinorPSDER.getMajorPSDataEntity()>
<#assign MajorEntityName=srfcaseformat(MinorPSDER.getCodeName(),'l_u2lC')>
<#assign MajorEntityName=srfr7templcaseformat(MinorPSDER.getCodeName())>
<#assign MajorKeyFieldName =MinorPSDER.getPSPickupDEField().name?lower_case>
<#assign MajorKeyFieldCodeName =srfcaseformat(MinorPSDER.getPSPickupDEField().codeName,'l_u2lC')?cap_first>
<#assign MajorKeyFieldCodeName =srfr7templcaseformat(MinorPSDER.getPSPickupDEField().codeName)?cap_first>
//实体关系[${MinorPSDER.name}]
if(!ObjectUtils.isEmpty(et.get${MajorKeyFieldCodeName}())){
<#if MinorPSDER.getPSDER1NDEFieldMaps?? && MinorPSDER.getPSDER1NDEFieldMaps()??>
${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()} ${MajorEntityName}=new ${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntity.getCodeName()}();
<#list MinorPSDER.getPSDER1NDEFieldMaps() as derField>
<#if derField.getMapType()=="COUNT" || derField.getMapType()=="SUM"|| derField.getMapType()=="AVG" || derField.getMapType()=="MAX" || derField.getMapType()=="MIN">
<#assign MajorEntityDEFieldCodeName=srfcaseformat(derField.getMajorPSDEField().codeName,'l_u2lC')>
<#assign MajorEntityDEFieldCodeName=srfr7templcaseformat(derField.getMajorPSDEField().codeName)>
<#if derField.getMapType()=="COUNT">
${MajorEntityName}.set("${MajorEntityDEFieldCodeName}",baseMapper.selectCount(new QueryWrapper().eq(true,"${MajorKeyFieldName}",et.get${MajorKeyFieldCodeName}())));
<#else>
......@@ -906,7 +906,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
</#if>
</#list>
${MajorEntityName}.set("${MajorKeyFieldCodeName?lower_case}",et.get${MajorKeyFieldCodeName}());
${srfcaseformat(MinorPSDER.getMajorPSDataEntity().getCodeName(),'l_u2lC')}Service.update(${MajorEntityName});
${srfr7templcaseformat(MinorPSDER.getMajorPSDataEntity().getCodeName())}Service.update(${MajorEntityName});
</#if>
}
</#if>
......@@ -928,7 +928,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<#list item.getMinorPSDERs() as MinorPSDER>
<#if MinorPSDER?? && MinorPSDER.getDERType()=='DER1N' && (MinorPSDER.getMajorPSDataEntity().getStorageMode()==1||MinorPSDER.getMajorPSDataEntity().getStorageMode()==2||MinorPSDER.getMajorPSDataEntity().getStorageMode()==4)>
<#if MinorPSDER.getMajorPSDataEntity?? && MinorPSDER.getMajorPSDataEntity()?? && MinorPSDER.getCodeName?? && MinorPSDER.getCodeName()??>
<#assign MajorKeyFieldCodeName =srfcaseformat(MinorPSDER.getPSPickupDEField().codeName,'l_u2lC')?cap_first>
<#assign MajorKeyFieldCodeName =srfr7templcaseformat(MinorPSDER.getPSPickupDEField().codeName)?cap_first>
//实体关系[${MinorPSDER.name}]
if(!ObjectUtils.isEmpty(entity.get${MajorKeyFieldCodeName}()) && !map.containsKey(entity.get${MajorKeyFieldCodeName}())){
map.put(entity.get${MajorKeyFieldCodeName}(),entity);
......@@ -951,7 +951,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<#if !P.exists('DER1N',majorIndexDECodeName)>
@Autowired
@Lazy
protected ${pub.getPKGCodeName()}.core.${majorIndexDE.getPSSystemModule().getCodeName()?lower_case}.service.I${majorIndexDECodeName}Service ${srfcaseformat(majorIndexDECodeName,'l_u2lC')}Service;
protected ${pub.getPKGCodeName()}.core.${majorIndexDE.getPSSystemModule().getCodeName()?lower_case}.service.I${majorIndexDECodeName}Service ${srfr7templcaseformat(majorIndexDECodeName)}Service;
</#if>
/**
......@@ -959,13 +959,13 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
* @param et
*/
private void createIndexMajorEntityData(${de.codeName} et){
if(ObjectUtils.isEmpty(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()))
et.set${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}((${srfr7javatype(keyfield.stdDataType)})et.getDefaultKey(true));
if(ObjectUtils.isEmpty(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}()))
et.set${srfr7templcaseformat(keyfield.codeName)?cap_first}((${srfr7javatype(keyfield.stdDataType)})et.getDefaultKey(true));
${pub.getPKGCodeName()}.core.${majorIndexDE.getPSSystemModule().getCodeName()?lower_case}.domain.${majorIndexDECodeName} ${majorIndexDECodeName?lower_case} =${de.codeName?lower_case}InheritMapping.to${majorIndexDECodeNameCamel}(et);
<#if majorIndexDE.getIndexTypePSDEField()??>
${majorIndexDECodeName?lower_case}.set("${majorIndexDE.getIndexTypePSDEField().codeName?lower_case}","${indexPSDER.getTypeValue()}");
</#if>
${srfcaseformat(majorIndexDECodeName,'l_u2lC')}Service.create(${majorIndexDECodeName?lower_case});
${srfr7templcaseformat(majorIndexDECodeName)}Service.create(${majorIndexDECodeName?lower_case});
}
</#if>
......@@ -1004,7 +1004,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
public List<${de.codeName}> get${deCodeNameCamel}ByEntities(List<${de.codeName}> entities) {
List ids =new ArrayList();
for(${de.codeName} entity : entities){
Serializable id=entity.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}();
Serializable id=entity.get${srfr7templcaseformat(keyfield.codeName)?cap_first}();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
......@@ -1025,8 +1025,8 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
<#if de.getKeyPSDEField().isPhisicalDEField()==false && de.getUnionKeyValuePSDEFields()??>
private ${item.getCodeName()} getById(${srfr7javatype(keyfield.getStdDataType())} id){
${item.getCodeName()} entity=new ${item.getCodeName()}();
entity.set${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(id);
if(ObjectUtils.isEmpty(entity.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}())){
entity.set${srfr7templcaseformat(keyfield.codeName)?cap_first}(id);
if(ObjectUtils.isEmpty(entity.get${srfr7templcaseformat(keyfield.codeName)?cap_first}())){
log.error("获取数据失败,联合键值为空");
return entity;
}
......@@ -1036,8 +1036,8 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
private boolean removeById(${srfr7javatype(keyfield.getStdDataType())} id){
${item.getCodeName()} entity=new ${item.getCodeName()}();
entity.set${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(id);
if(ObjectUtils.isEmpty(entity.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}())){
entity.set${srfr7templcaseformat(keyfield.codeName)?cap_first}(id);
if(ObjectUtils.isEmpty(entity.get${srfr7templcaseformat(keyfield.codeName)?cap_first}())){
log.error("删除数据失败,联合键值为空");
return false;
}
......@@ -1046,7 +1046,7 @@ public class ${item.getCodeName()}ServiceImpl extends ServiceImpl<${de.getCodeNa
public boolean updateById(${item.getCodeName()} et){
UpdateWrapper<${item.getCodeName()}> wrapper=et.getUpdateWrapper(true);
if(ObjectUtils.isEmpty(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}())){
if(ObjectUtils.isEmpty(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}())){
log.error("更新数据失败,联合键值为空");
return false;
}
......@@ -1113,7 +1113,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if !P.exists('DEMinorPSDataEntity',der.getMinorPSDataEntity().getCodeName())>
@Autowired
@Lazy
protected ${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMinorPSDataEntity().getCodeName()}Service ${srfcaseformat(der.getMinorPSDataEntity().getCodeName(),'l_u2lC')}Service;
protected ${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMinorPSDataEntity().getCodeName()}Service ${srfr7templcaseformat(der.getMinorPSDataEntity().getCodeName())}Service;
</#if>
</#if>
</#list>
......@@ -1208,7 +1208,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#list>
</#if>
<#if nested>
et.set${srfcaseformat(listcode,'l_u2lC')?cap_first}(${srfcaseformat(MinorEntity.getCodeName(),'l_u2lC')}Service.selectBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(key));
et.set${srfr7templcaseformat(listcode)?cap_first}(${srfr7templcaseformat(MinorEntity.getCodeName())}Service.selectBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(key));
</#if>
</#if>
</#if>
......@@ -1249,14 +1249,14 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#list>
</#if>
<#if nested>
${srfcaseformat(MinorEntity.getCodeName(),'l_u2lC')}Service.saveBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(), et.get${srfcaseformat(listcode,'l_u2lC')?cap_first}());
${srfr7templcaseformat(MinorEntity.getCodeName())}Service.saveBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}(), et.get${srfr7templcaseformat(listcode)?cap_first}());
</#if>
</#if>
</#if>
</#list>
</#if>
<#comment>成功后get填充一次完整信息</#comment>
CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()), et);
CachedBeanCopier.copy(get(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}()), et);
<#comment>附加数据逻辑-操作后</#comment>
<@addAfterLogic deaction/>
return true ;
......@@ -1311,14 +1311,14 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#list>
</#if>
<#if nested>
${srfcaseformat(MinorEntity.getCodeName(),'l_u2lC')}Service.saveBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(), et.get${srfcaseformat(listcode,'l_u2lC')?cap_first}());
${srfr7templcaseformat(MinorEntity.getCodeName())}Service.saveBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}(), et.get${srfr7templcaseformat(listcode)?cap_first}());
</#if>
</#if>
</#if>
</#list>
</#if>
<#comment>成功后get填充一次完整信息</#comment>
CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()), et);
CachedBeanCopier.copy(get(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}()), et);
<#comment>附加数据逻辑-操作后</#comment>
<@addAfterLogic deaction/>
return true ;
......@@ -1366,14 +1366,14 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#list>
</#if>
<#if nested>
${srfcaseformat(MinorEntity.getCodeName(),'l_u2lC')}Service.saveBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(), et.get${srfcaseformat(listcode,'l_u2lC')?cap_first}());
${srfr7templcaseformat(MinorEntity.getCodeName())}Service.saveBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}(), et.get${srfr7templcaseformat(listcode)?cap_first}());
</#if>
</#if>
</#if>
</#list>
</#if>
<#comment>成功后get填充一次完整信息</#comment>
CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()), et);
CachedBeanCopier.copy(get(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}()), et);
<#comment>附加数据逻辑-操作后</#comment>
<@addAfterLogic deaction/>
return true ;
......@@ -1402,7 +1402,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if der.getDERType() =='DER1N' && der.isNestedRS() && der.getMinorPSDataEntity()?? && (der.getMinorPSDataEntity().getStorageMode()==1||der.getMinorPSDataEntity().getStorageMode()==2||der.getMinorPSDataEntity().getStorageMode()==4) >
<#assign MajorDerField = der.getPSPickupDEField()>
<#assign minorKeyField = der.getMinorPSDataEntity().getKeyPSDEField()>
${srfcaseformat(der.getMinorPSDataEntity().getCodeName(),'l_u2lC')}Service.removeBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(key) ;
${srfr7templcaseformat(der.getMinorPSDataEntity().getCodeName())}Service.removeBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(key) ;
</#if>
</#list>
</#if>
......@@ -1439,7 +1439,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
@Override
public boolean checkKey(${item.getCodeName()} et) {
<@outputTestAction deaction "checkkey"/>
return repository.findById(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()).isPresent();
return repository.findById(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}()).isPresent();
}
<#else>
......@@ -1477,7 +1477,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#assign deDefaultDataSet=de.getDefaultPSDEDataSet()>
<#if deDefaultDataSet.getPSDEDataQueries()??>
@Override
public List<${item.getCodeName()}> selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
public List<${item.getCodeName()}> selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
${item.getCodeName()}SearchContext context=new ${item.getCodeName()}SearchContext();
context.setN_${MajorField.name?lower_case}_eq(${MajorkeyField.codeName?lower_case});
Query query = new BasicQuery(context.getSelectCond().get().toString());
......@@ -1486,10 +1486,10 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#comment>输出主实体删除关联行为</#comment>
<@majorEntityRemove_RefAction MinorPSDER/>
@Override
public void removeBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
public void removeBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
Set<${srfr7javatype(keyfield.stdDataType)}> delIds=new HashSet<${srfr7javatype(keyfield.stdDataType)}>();
for(${item.getCodeName()} before:selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}());
for(${item.getCodeName()} before:selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}());
}
if(delIds.size()>0)
this.removeBatch(delIds);
......@@ -1505,21 +1505,21 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if nested>
<@autowiredProxyService/>
@Override
public void saveBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case},List<${item.getCodeName()}> list) {
public void saveBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case},List<${item.getCodeName()}> list) {
if(list==null)
return;
Set<${srfr7javatype(keyfield.stdDataType)}> delIds=new HashSet<${srfr7javatype(keyfield.stdDataType)}>();
List<${item.getCodeName()}> _update=new ArrayList<${item.getCodeName()}>();
List<${item.getCodeName()}> _create=new ArrayList<${item.getCodeName()}>();
for(${item.getCodeName()} before:selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}());
for(${item.getCodeName()} before:selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}());
}
for(${item.getCodeName()} sub:list) {
sub.set${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${MajorkeyField.codeName?lower_case});
if(ObjectUtils.isEmpty(sub.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}()))
sub.set${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}((${srfr7javatype(keyfield.stdDataType)})sub.getDefaultKey(true));
if(delIds.contains(sub.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}())) {
delIds.remove(sub.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}());
sub.set${srfr7templcaseformat(MajorField.codeName)?cap_first}(${MajorkeyField.codeName?lower_case});
if(ObjectUtils.isEmpty(sub.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}()))
sub.set${srfr7templcaseformat(keyfield.getCodeName())?cap_first}((${srfr7javatype(keyfield.stdDataType)})sub.getDefaultKey(true));
if(delIds.contains(sub.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}())) {
delIds.remove(sub.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}());
_update.add(sub);
}
else
......@@ -1582,7 +1582,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
List ids =new ArrayList();
for(${de.codeName} entity : entities){
Serializable id=entity.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}();
Serializable id=entity.get${srfr7templcaseformat(keyfield.codeName)?cap_first}();
if(!ObjectUtils.isEmpty(id)){
ids.add(id);
}
......@@ -1639,7 +1639,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if !P.exists('DEMinorPSDataEntity',der.getMinorPSDataEntity().getCodeName())>
@Autowired
@Lazy
protected ${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMinorPSDataEntity().getCodeName()}Service ${srfcaseformat(der.getMinorPSDataEntity().getCodeName(),'l_u2lC')}Service;
protected ${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMinorPSDataEntity().getCodeName()}Service ${srfr7templcaseformat(der.getMinorPSDataEntity().getCodeName())}Service;
</#if>
</#if>
</#list>
......@@ -1659,7 +1659,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<@outputTestAction deaction "usercustom"/>
<#comment>附加数据逻辑-操作前</#comment>
<@addBoforeLogic deaction/>
et = ${subSysServiceApiDECodeName?uncap_first}FeignClient.${deaction.getPSSubSysServiceAPIDEMethod().getCodeName()?uncap_first}(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(), et);
et = ${subSysServiceApiDECodeName?uncap_first}FeignClient.${deaction.getPSSubSysServiceAPIDEMethod().getCodeName()?uncap_first}(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}(), et);
<#comment>附加数据逻辑-操作后</#comment>
<@addAfterLogic deaction/>
return et;
......@@ -1714,7 +1714,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#list>
</#if>
<#if nested>
et.set${srfcaseformat(listcode,'l_u2lC')?cap_first}(${srfcaseformat(MinorEntity.getCodeName(),'l_u2lC')}Service.selectBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(key));
et.set${srfr7templcaseformat(listcode)?cap_first}(${srfr7templcaseformat(MinorEntity.getCodeName())}Service.selectBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(key));
</#if>
</#if>
</#if>
......@@ -1763,8 +1763,8 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#list>
</#if>
<#if nested>
${srfcaseformat(MinorEntity.getCodeName(),'l_u2lC')}Service.saveBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(rt.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(), et.get${srfcaseformat(listcode,'l_u2lC')?cap_first}());
rt.set${srfcaseformat(listcode,'l_u2lC')?cap_first}(et.get${srfcaseformat(listcode,'l_u2lC')?cap_first}());
${srfr7templcaseformat(MinorEntity.getCodeName())}Service.saveBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(rt.get${srfr7templcaseformat(keyfield.codeName)?cap_first}(), et.get${srfr7templcaseformat(listcode)?cap_first}());
rt.set${srfr7templcaseformat(listcode)?cap_first}(et.get${srfr7templcaseformat(listcode)?cap_first}());
</#if>
</#if>
</#if>
......@@ -1805,7 +1805,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if deaction.getPSSubSysServiceAPIDEMethod()?? >
<#comment>附加数据逻辑-操作前</#comment>
<@addBoforeLogic deaction/>
${item.getCodeName()} rt = ${subSysServiceApiDECodeName?uncap_first}FeignClient.update(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(),et);
${item.getCodeName()} rt = ${subSysServiceApiDECodeName?uncap_first}FeignClient.update(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}(),et);
if(rt==null)
return false;
<#comment>1N关系中,在父实体中创建子实体的List集合</#comment>
......@@ -1826,8 +1826,8 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#list>
</#if>
<#if nested>
${srfcaseformat(MinorEntity.getCodeName(),'l_u2lC')}Service.saveBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(), et.get${srfcaseformat(listcode,'l_u2lC')?cap_first}()));
rt.set${srfcaseformat(listcode,'l_u2lC')?cap_first}(et.get${srfcaseformat(listcode,'l_u2lC')?cap_first}());
${srfr7templcaseformat(MinorEntity.getCodeName())}Service.saveBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}(), et.get${srfr7templcaseformat(listcode)?cap_first}()));
rt.set${srfr7templcaseformat(listcode)?cap_first}(et.get${srfr7templcaseformat(listcode)?cap_first}());
</#if>
</#if>
</#if>
......@@ -1892,8 +1892,8 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#list>
</#if>
<#if nested>
${srfcaseformat(MinorEntity.getCodeName(),'l_u2lC')}Service.saveBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(),et.get${srfcaseformat(listcode,'l_u2lC')?cap_first}());
rt.set${srfcaseformat(listcode,'l_u2lC')?cap_first}(et.get${srfcaseformat(listcode,'l_u2lC')?cap_first}());
${srfr7templcaseformat(MinorEntity.getCodeName())}Service.saveBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}(),et.get${srfr7templcaseformat(listcode)?cap_first}());
rt.set${srfr7templcaseformat(listcode)?cap_first}(et.get${srfr7templcaseformat(listcode)?cap_first}());
</#if>
</#if>
</#if>
......@@ -1941,7 +1941,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if der.getDERType() =='DER1N' && der.isNestedRS() && der.getMinorPSDataEntity()?? && (der.getMinorPSDataEntity().getStorageMode()==1||der.getMinorPSDataEntity().getStorageMode()==2) >
<#assign MajorDerField = der.getPSPickupDEField()>
<#assign minorKeyField = der.getMinorPSDataEntity().getKeyPSDEField()>
${srfcaseformat(der.getMinorPSDataEntity().getCodeName(),'l_u2lC')}Service.removeBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(key) ;
${srfr7templcaseformat(der.getMinorPSDataEntity().getCodeName())}Service.removeBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(key) ;
</#if>
</#list>
</#if>
......@@ -2019,7 +2019,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if deaction.getPSSubSysServiceAPIDEMethod()?? >
<#comment>附加数据逻辑-操作前</#comment>
<@addBoforeLogic deaction/>
et=${subSysServiceApiDECodeName?uncap_first}FeignClient.${deaction.getPSSubSysServiceAPIDEMethod().getCodeName()?uncap_first}(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(),et);
et=${subSysServiceApiDECodeName?uncap_first}FeignClient.${deaction.getPSSubSysServiceAPIDEMethod().getCodeName()?uncap_first}(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}(),et);
<#comment>附加数据逻辑-操作后</#comment>
<@addAfterLogic deaction/>
return et;
......@@ -2053,7 +2053,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#assign deDefaultDataSet=de.getDefaultPSDEDataSet()>
<#if deDefaultDataSet.getPSDEDataQueries()??>
@Override
public List<${item.getCodeName()}> selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
public List<${item.getCodeName()}> selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
${item.getCodeName()}SearchContext context=new ${item.getCodeName()}SearchContext();
context.setSize(Integer.MAX_VALUE);
context.setN_${MajorField.name?lower_case}_eq(${MajorkeyField.codeName?lower_case});
......@@ -2062,10 +2062,10 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#comment>输出主实体删除关联行为</#comment>
<@majorEntityRemove_RefAction MinorPSDER/>
@Override
public void removeBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
public void removeBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
Set<${srfr7javatype(keyfield.stdDataType)}> delIds=new HashSet<${srfr7javatype(keyfield.stdDataType)}>();
for(${item.getCodeName()} before:selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}());
for(${item.getCodeName()} before:selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}());
}
if(delIds.size()>0)
this.removeBatch(delIds);
......@@ -2082,21 +2082,21 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if nested>
<@autowiredProxyService/>
@Override
public void saveBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case},List<${item.getCodeName()}> list) {
public void saveBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case},List<${item.getCodeName()}> list) {
if(list==null)
return;
Set<${srfr7javatype(keyfield.stdDataType)}> delIds=new HashSet<${srfr7javatype(keyfield.stdDataType)}>();
List<${item.getCodeName()}> _update=new ArrayList<${item.getCodeName()}>();
List<${item.getCodeName()}> _create=new ArrayList<${item.getCodeName()}>();
for(${item.getCodeName()} before:selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}());
for(${item.getCodeName()} before:selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}());
}
for(${item.getCodeName()} sub:list) {
sub.set${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${MajorkeyField.codeName?lower_case});
if(ObjectUtils.isEmpty(sub.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}()))
sub.set${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}((${srfr7javatype(keyfield.stdDataType)})sub.getDefaultKey(true));
if(delIds.contains(sub.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}())) {
delIds.remove(sub.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}());
sub.set${srfr7templcaseformat(MajorField.codeName)?cap_first}(${MajorkeyField.codeName?lower_case});
if(ObjectUtils.isEmpty(sub.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}()))
sub.set${srfr7templcaseformat(keyfield.getCodeName())?cap_first}((${srfr7javatype(keyfield.stdDataType)})sub.getDefaultKey(true));
if(delIds.contains(sub.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}())) {
delIds.remove(sub.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}());
_update.add(sub);
}
else
......@@ -2183,7 +2183,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if !P.exists('DEMinorPSDataEntity',der.getMinorPSDataEntity().getCodeName())>
@Autowired
@Lazy
protected ${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMinorPSDataEntity().getCodeName()}Service ${srfcaseformat(der.getMinorPSDataEntity().getCodeName(),'l_u2lC')}Service;
protected ${pub.getPKGCodeName()}.core.${der.getMinorPSDataEntity().getPSSystemModule().getCodeName()?lower_case}.service.I${der.getMinorPSDataEntity().getCodeName()}Service ${srfr7templcaseformat(der.getMinorPSDataEntity().getCodeName())}Service;
</#if>
</#if>
</#list>
......@@ -2256,7 +2256,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<@buildEntityParam deaction/>
<@addGetActionBoforeLogic deaction/>
${item.getCodeName()} et = new ${item.getCodeName()}();
et.set${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(key);
et.set${srfr7templcaseformat(keyfield.codeName)?cap_first}(key);
<#comment>附加数据逻辑-操作后</#comment>
<@addAfterLogic deaction/>
return et;
......@@ -2401,16 +2401,16 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#assign deDefaultDataSet=de.getDefaultPSDEDataSet()>
<#if deDefaultDataSet.getPSDEDataQueries()??>
@Override
public List<${item.getCodeName()}> selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
public List<${item.getCodeName()}> selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
return null;
}
<#comment>输出主实体删除关联行为</#comment>
<@majorEntityRemove_RefAction MinorPSDER/>
@Override
public void removeBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
public void removeBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
Set<${srfr7javatype(keyfield.stdDataType)}> delIds=new HashSet<${srfr7javatype(keyfield.stdDataType)}>();
for(${item.getCodeName()} before:selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}());
for(${item.getCodeName()} before:selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}());
}
if(delIds.size()>0)
this.removeBatch(delIds);
......@@ -2427,21 +2427,21 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if nested>
<@autowiredProxyService/>
@Override
public void saveBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case},List<${item.getCodeName()}> list) {
public void saveBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case},List<${item.getCodeName()}> list) {
if(list==null)
return;
Set<${srfr7javatype(keyfield.stdDataType)}> delIds=new HashSet<${srfr7javatype(keyfield.stdDataType)}>();
List<${item.getCodeName()}> _update=new ArrayList<${item.getCodeName()}>();
List<${item.getCodeName()}> _create=new ArrayList<${item.getCodeName()}>();
for(${item.getCodeName()} before:selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}());
for(${item.getCodeName()} before:selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${MajorkeyField.codeName?lower_case})){
delIds.add(before.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}());
}
for(${item.getCodeName()} sub:list) {
sub.set${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${MajorkeyField.codeName?lower_case});
if(ObjectUtils.isEmpty(sub.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}()))
sub.set${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}((${srfr7javatype(keyfield.stdDataType)})sub.getDefaultKey(true));
if(delIds.contains(sub.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}())) {
delIds.remove(sub.get${srfcaseformat(keyfield.getCodeName(),'l_u2lC')?cap_first}());
sub.set${srfr7templcaseformat(MajorField.codeName)?cap_first}(${MajorkeyField.codeName?lower_case});
if(ObjectUtils.isEmpty(sub.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}()))
sub.set${srfr7templcaseformat(keyfield.getCodeName())?cap_first}((${srfr7javatype(keyfield.stdDataType)})sub.getDefaultKey(true));
if(delIds.contains(sub.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}())) {
delIds.remove(sub.get${srfr7templcaseformat(keyfield.getCodeName())?cap_first}());
_update.add(sub);
}
else
......@@ -2591,13 +2591,13 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#assign actionLogicDEAction=actionlogic.getDstPSDEAction()>
${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()} actionLogicDE =new ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()}();
et.copyTo(actionLogicDE,true);
${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.${srfmethodname(actionLogicDEAction.getCodeName())}(actionLogicDE);
${srfr7templcaseformat(actionLogicDE.getCodeName())}Service.${srfmethodname(actionLogicDEAction.getCodeName())}(actionLogicDE);
</#macro>
<#comment>实体行为附加逻辑-remove</#comment>
<#macro actionLogic_remove actionlogic>
<#if de.getKeyPSDEField().getStdDataType()==actionLogicDE.getKeyPSDEField().getStdDataType()>
${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.remove(key);
${srfr7templcaseformat(actionLogicDE.getCodeName())}Service.remove(key);
</#if>
</#macro>
......@@ -2634,7 +2634,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
@Autowired
@Lazy
protected ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.service.I${actionLogicDE.getCodeName()}Service ${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service;
protected ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.service.I${actionLogicDE.getCodeName()}Service ${srfr7templcaseformat(actionLogicDE.getCodeName())}Service;
</#if>
</#if>
</#macro>
......@@ -2650,7 +2650,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if actionParam.getValueType()=='SESSION' || actionParam.getValueType()=='PARAM'|| actionParam.getValueType()=='CONTEXT'>
<#assign targetFieldName=actionParam.getValue()>
<#if de.getPSDEField(targetFieldName,true)??>
<#assign targetFieldName=srfcaseformat(de.getPSDEField(targetFieldName,true).getCodeName(),'l_u2lC')>
<#assign targetFieldName=srfr7templcaseformat(de.getPSDEField(targetFieldName,true).getCodeName())>
</#if>
</#if>
<#assign actionParamFieldCodeName=actionParam.getPSDEField().codeName>
......@@ -2916,11 +2916,11 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#list de.getMinorPSDERs() as MinorPSDER>
<#if MinorPSDER?? && MinorPSDER.getDERType()=='DER1N' && (MinorPSDER.getMajorPSDataEntity().getStorageMode()==1||MinorPSDER.getMajorPSDataEntity().getStorageMode()==2||MinorPSDER.getMajorPSDataEntity().getStorageMode()==4)>
<#if MinorPSDER.getMajorPSDataEntity?? && MinorPSDER.getMajorPSDataEntity()?? && MinorPSDER.getCodeName?? && MinorPSDER.getCodeName()??>
<#assign MajorKeyFieldCodeName =srfcaseformat(MinorPSDER.getPSPickupDEField().codeName,'l_u2lC')?cap_first>
<#assign MajorKeyFieldCodeName =srfr7templcaseformat(MinorPSDER.getPSPickupDEField().codeName)?cap_first>
<#assign MajorEntity=MinorPSDER.getMajorPSDataEntity()>
<#assign MajorEntityCodeName=MinorPSDER.getMajorPSDataEntity().codeName>
<#assign MajorEntityService=srfcaseformat(MinorPSDER.getMajorPSDataEntity().getCodeName(),'l_u2lC')+"Service">
<#assign MajorEntityKeyFieldCodeName=srfcaseformat(MajorEntity.getKeyPSDEField().codeName,'l_u2lC')?cap_first>
<#assign MajorEntityService=srfr7templcaseformat(MinorPSDER.getMajorPSDataEntity().getCodeName())+"Service">
<#assign MajorEntityKeyFieldCodeName=srfr7templcaseformat(MajorEntity.getKeyPSDEField().codeName)?cap_first>
//实体关系[${MinorPSDER.name}]
if(!ObjectUtils.isEmpty(entity.get${MajorKeyFieldCodeName}())){
${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntityCodeName} fkEntity=new ${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().getCodeName()?lower_case}.domain.${MajorEntityCodeName}();
......@@ -2942,7 +2942,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#comment>通过外键值文本填充外键值</#comment>
<#assign foreignkeyId = MajorKeyFieldCodeName>
<#assign foreignkeyField = MinorPSDER.getPSPickupTextDEField()>
<#assign foreignkeyName = srfcaseformat(foreignkeyField.getCodeName(),'l_u2lC')?cap_first>
<#assign foreignkeyName = srfr7templcaseformat(foreignkeyField.getCodeName())?cap_first>
<#assign importTag=foreignkeyField.getCodeName()>
<#if ((foreignkeyField.getImportTag())!'')!=''>
<#assign importTag=foreignkeyField.getImportTag()>
......@@ -3092,7 +3092,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#function getUnionKeyUpdateCond unionKeyList>
<#assign formatValue="">
<#list item.getUnionKeyValuePSDEFields() as defield>
<#assign unionKeyPrivateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign unionKeyPrivateCodeName = srfr7templcaseformat(defield.getCodeName()) >
<#assign unionKeyPublicCodeName = unionKeyPrivateCodeName?cap_first >
<#assign unionKeyCodeName = unionKeyPrivateCodeName?lower_case >
<#assign formatValue=formatValue+".eq(\""+unionKeyCodeName+"\",et.get"+unionKeyPublicCodeName+"())">
......@@ -3137,11 +3137,11 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#assign minorKeyField = der.getMinorPSDataEntity().getKeyPSDEField()>
<#assign minorEntityCodeName=der.getMinorPSDataEntity().getCodeName()>
<#if der.getRemoveActionType()?c=='1'><#comment>同时删除</#comment>
${srfcaseformat(minorEntityCodeName,'l_u2lC')}Service.removeBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(key);
${srfr7templcaseformat(minorEntityCodeName)}Service.removeBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(key);
<#elseif der.getRemoveActionType()?c=='2'><#comment>置空</#comment>
${srfcaseformat(minorEntityCodeName,'l_u2lC')}Service.resetBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(key);
${srfr7templcaseformat(minorEntityCodeName)}Service.resetBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(key);
<#elseif der.getRemoveActionType()?c=='3'><#comment>限制删除</#comment>
if(!ObjectUtils.isEmpty(${srfcaseformat(minorEntityCodeName,'l_u2lC')}Service.selectBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(key)))
if(!ObjectUtils.isEmpty(${srfr7templcaseformat(minorEntityCodeName)}Service.selectBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(key)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[${minorEntityCodeName}]数据,无法删除!","","");
</#if>
</#if>
......@@ -3156,11 +3156,11 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#assign minorKeyField = der.getMinorPSDataEntity().getKeyPSDEField()>
<#assign minorEntityCodeName=der.getMinorPSDataEntity().getCodeName()>
<#if der.getRemoveActionType()?c=='1'><#comment>同时删除</#comment>
${srfcaseformat(minorEntityCodeName,'l_u2lC')}Service.removeBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(idList);
${srfr7templcaseformat(minorEntityCodeName)}Service.removeBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(idList);
<#elseif der.getRemoveActionType()?c=='2'><#comment>置空</#comment>
${srfcaseformat(minorEntityCodeName,'l_u2lC')}Service.resetBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(idList);
${srfr7templcaseformat(minorEntityCodeName)}Service.resetBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(idList);
<#elseif der.getRemoveActionType()?c=='3'><#comment>限制删除</#comment>
if(!ObjectUtils.isEmpty(${srfcaseformat(minorEntityCodeName,'l_u2lC')}Service.selectBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}(idList)))
if(!ObjectUtils.isEmpty(${srfr7templcaseformat(minorEntityCodeName)}Service.selectBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}(idList)))
throw new BadRequestAlertException("删除数据失败,当前数据存在关系实体[${minorEntityCodeName}]数据,无法删除!","","");
</#if>
</#if>
......@@ -3173,24 +3173,24 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if MinorPSDER.getRemoveActionType()??>
<#if MinorPSDER.getRemoveActionType()?c=='3'><#comment>限制删除</#comment>
@Override
public List<${item.getCodeName()}> selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids) {
public List<${item.getCodeName()}> selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids) {
return this.list(new QueryWrapper<${item.getCodeName()}>().in("${MajorkeyField.codeName?lower_case}",ids));
}
<#elseif MinorPSDER.getRemoveActionType()?c=='2'><#comment>置空</#comment>
@Override
public void resetBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
public void resetBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
this.update(new UpdateWrapper<${item.getCodeName()}>().set("${MajorField.getName()?lower_case}",null).eq("${MajorField.getName()?lower_case}",${MajorkeyField.codeName?lower_case}));
}
@Override
public void resetBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids) {
public void resetBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids) {
this.update(new UpdateWrapper<${item.getCodeName()}>().set("${MajorField.getName()?lower_case}",null).in("${MajorField.getName()?lower_case}",ids));
}
<#elseif MinorPSDER.getRemoveActionType()?c=='1'><#comment>同时删除</#comment>
@Override
public void removeBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids) {
public void removeBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids) {
this.remove(new QueryWrapper<${item.getCodeName()}>().in("${MajorField.getName()?lower_case}",ids));
}
......@@ -3203,23 +3203,23 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if MinorPSDER.getRemoveActionType()??>
<#if MinorPSDER.getRemoveActionType()?c=='3'><#comment>限制删除</#comment>
@Override
public List<${item.getCodeName()}> selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids) {
public List<${item.getCodeName()}> selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids) {
//暂未支持
return null;
}
<#elseif MinorPSDER.getRemoveActionType()?c=='2'><#comment>置空</#comment>
@Override
public void resetBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
public void resetBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case}) {
}
@Override
public void resetBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids) {
public void resetBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids) {
}
<#elseif MinorPSDER.getRemoveActionType()?c=='1'><#comment>同时删除</#comment>
@Override
public void removeBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids) {
public void removeBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids) {
}
</#if>
......@@ -3300,3 +3300,15 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#macro>
</#if>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -23,7 +23,7 @@ public class ${item.codeName} implements Serializable {
<#comment>输出实体属性</#comment>
<#list de.getPSDEFields() as defield>
<#if defield.isPhisicalDEField()==true>
<#assign privateCodeName = srfcaseformat(defield.getCodeName(),'l_u2lC') >
<#assign privateCodeName = srfr7templcaseformat(defield.getCodeName()) >
<#assign javaType=srfr7javatype(defield.getStdDataType())>
<#assign esType="FieldType.Text">
<#if javaType=='Long'>
......@@ -47,7 +47,17 @@ public class ${item.codeName} implements Serializable {
}
</#if>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -38,7 +38,7 @@ public class ${item.getCodeName()}ESServiceImpl implements I${de.getCodeName()}E
Optional<${item.getCodeName()}> result = repository.findById(key);
if(!result.isPresent()){
${item.getCodeName()} et=new ${item.getCodeName()}();
et.set${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(key);
et.set${srfr7templcaseformat(keyfield.codeName)?cap_first}(key);
return et;
}
else{
......@@ -50,7 +50,7 @@ public class ${item.getCodeName()}ESServiceImpl implements I${de.getCodeName()}E
@Override
public boolean create(${item.getCodeName()} et) {
repository.save(et);
CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()),et);
CachedBeanCopier.copy(get(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}()),et);
return true;
}
......@@ -63,7 +63,7 @@ public class ${item.getCodeName()}ESServiceImpl implements I${de.getCodeName()}E
@Override
public boolean update(${item.getCodeName()} et) {
repository.save(et);
CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()),et);
CachedBeanCopier.copy(get(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}()),et);
return true;
}
......@@ -76,7 +76,7 @@ public class ${item.getCodeName()}ESServiceImpl implements I${de.getCodeName()}E
@Override
public boolean save(${item.getCodeName()} et) {
repository.save(et);
CachedBeanCopier.copy(get(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()),et);
CachedBeanCopier.copy(get(et.get${srfr7templcaseformat(keyfield.codeName)?cap_first}()),et);
return true;
}
......@@ -110,4 +110,16 @@ public class ${item.getCodeName()}ESServiceImpl implements I${de.getCodeName()}E
</#list>
</#if>
}
</#if>
\ No newline at end of file
</#if>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -99,7 +99,7 @@ public class RocketMQListenerProcessor implements MessageListenerOrderly {
domain.set(entry.getKey(),entry.getValue());
}
<#if inputAction?lower_case == 'get' || inputAction?lower_case == 'remove'>
${entityName}Service.${inputAction}(domain.get${srfcaseformat(dataEntity.getKeyPSDEField().codeName,'l_u2lC')?cap_first}());
${entityName}Service.${inputAction}(domain.get${srfr7templcaseformat(dataEntity.getKeyPSDEField().codeName)?cap_first}());
<#else>
${entityName}Service.${inputAction}(domain);
</#if>
......@@ -119,4 +119,16 @@ public class RocketMQListenerProcessor implements MessageListenerOrderly {
return ConsumeOrderlyStatus.SUCCESS;
}
}
</#if>
\ No newline at end of file
</#if>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -24,7 +24,7 @@ public class ${item.codeName}JobHandler implements IJobsHandler {
<#if hasDEAction>
@Autowired
@Lazy
protected ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower_case}.service.I${de.getCodeName()}Service ${srfcaseformat(de.getCodeName(),'l_u2lC')}Service;
protected ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower_case}.service.I${de.getCodeName()}Service ${srfr7templcaseformat(de.getCodeName())}Service;
</#if>
@Override
......@@ -33,9 +33,22 @@ public class ${item.codeName}JobHandler implements IJobsHandler {
${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower_case}.domain.${de.codeName} entity = ${pub.getPKGCodeName()}.util.helper.Setting.getEntity(param, new ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower_case}.domain.${de.codeName}());
entity.set("tenantid", tenantId);
entity.set("param", param);
${srfcaseformat(de.getCodeName(),'l_u2lC')}Service.${srfmethodname(deaction.getCodeName())}(entity);
${srfr7templcaseformat(de.getCodeName())}Service.${srfmethodname(deaction.getCodeName())}(entity);
</#if>
log.info("执行 DemoJobHandler tenantId=" + tenantId + ",param=" + param);
return JobsResponse.ok();
}
}
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -46,14 +46,14 @@ TARGET=PSDATAENTITY
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap id="${de.codeName}ResultMap" type="${pub.getPKGCodeName()}.core.${de.getPSSystemModule().codeName?lower_case}.domain.${de.codeName}" autoMapping="true">
<#if de.getKeyPSDEField().isPhisicalDEField()==true>
<id property="${srfcaseformat(de.getKeyPSDEField().codeName,'l_u2lC')}" column="${de.getKeyPSDEField().getName()?lower_case}" /><!--主键字段映射-->
<id property="${srfr7templcaseformat(de.getKeyPSDEField().codeName)}" column="${de.getKeyPSDEField().getName()?lower_case}" /><!--主键字段映射-->
</#if>
<#comment>外键值字段映射:由于需要将一个数据库列注入到2个domian属性中(主关系实体对象),由于已经手动将列映射给主关系对象,所以autoMapping将不会自动注入外键id,需要再次声明映射关系</#comment>
<#comment>属性名称与代码名称不一致时,强制进行映射</#comment>
<#list item.getPSDEFields() as defield>
<#if defield.isKeyDEField()!=true && ((defield.getDataType())!"")!='ONE2MANYDATA'>
<#if srfcaseformat(defield.codeName,'l_u2lC')?lower_case != defield.name?lower_case || defield.getDataType()=='PICKUP'>
<result property="${srfcaseformat(defield.codeName,'l_u2lC')}" column="${defield.getName()?lower_case}" />
<#if srfr7templcaseformat(defield.codeName)?lower_case != defield.name?lower_case || defield.getDataType()=='PICKUP'>
<result property="${srfr7templcaseformat(defield.codeName)}" column="${defield.getName()?lower_case}" />
</#if>
</#if>
</#list>
......@@ -78,9 +78,9 @@ TARGET=PSDATAENTITY
<#if nested>
<#if MinorEntity.getStorageMode()==0 && MajorPSDER.getPSOne2ManyDataDEField()?? && MajorPSDER.getPSOne2ManyDataDEField().isPhisicalDEField()==true>
<#assign columnname=MajorPSDER.getPSOne2ManyDataDEField().getName()?lower_case>
<result property="${srfcaseformat(listcode,'l_u2lC')}" column="${columnname}" typeHandler="${pub.getPKGCodeName()}.core.${MinorEntity.getPSSystemModule().codeName?lower_case}.domain.handlers.${MinorEntity.codeName}TypeHandler" />
<result property="${srfr7templcaseformat(listcode)}" column="${columnname}" typeHandler="${pub.getPKGCodeName()}.core.${MinorEntity.getPSSystemModule().codeName?lower_case}.domain.handlers.${MinorEntity.codeName}TypeHandler" />
</#if>
<#--<collection property="${srfcaseformat(listcode,'l_u2lC')}" ofType="${pub.getPKGCodeName()}.core.${MinorEntity.getPSSystemModule().codeName?lower_case}.domain.${MinorEntity.codeName}" column="${de.getKeyPSDEField().getName()?lower_case}" select="${pub.getPKGCodeName()}.core.${MinorEntity.getPSSystemModule().codeName?lower_case}.mapper.${MinorEntity.codeName}Mapper.selectBy${srfcaseformat(MajorDerField.codeName,'l_u2lC')?cap_first}" fetchType="lazy"></collection>-->
<#--<collection property="${srfr7templcaseformat(listcode)}" ofType="${pub.getPKGCodeName()}.core.${MinorEntity.getPSSystemModule().codeName?lower_case}.domain.${MinorEntity.codeName}" column="${de.getKeyPSDEField().getName()?lower_case}" select="${pub.getPKGCodeName()}.core.${MinorEntity.getPSSystemModule().codeName?lower_case}.mapper.${MinorEntity.codeName}Mapper.selectBy${srfr7templcaseformat(MajorDerField.codeName)?cap_first}" fetchType="lazy"></collection>-->
</#if>
</#if>
</#if>
......@@ -98,7 +98,7 @@ TARGET=PSDATAENTITY
<#assign MajorkeyField = MajorEntity.getKeyPSDEField()>
<#assign MajorField = MinorPSDER.getPSPickupDEField()>
<!--通过mybatis自动注入关系属性[主实体],fetchType="lazy"为懒加载配置 -->
<association property="${srfcaseformat(MinorPSDER.getCodeName(),'l_u2lC')}" javaType="${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().codeName?lower_case}.domain.${MajorEntity.codeName}" column="${MajorField.getName()?lower_case}" select="${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().codeName?lower_case}.mapper.${MajorEntity.codeName}Mapper.selectById" fetchType="lazy"></association>
<association property="${srfr7templcaseformat(MinorPSDER.getCodeName())}" javaType="${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().codeName?lower_case}.domain.${MajorEntity.codeName}" column="${MajorField.getName()?lower_case}" select="${pub.getPKGCodeName()}.core.${MajorEntity.getPSSystemModule().codeName?lower_case}.mapper.${MajorEntity.codeName}Mapper.selectById" fetchType="lazy"></association>
</#if>
</#if>
</#if>
......@@ -134,7 +134,7 @@ TARGET=PSDATAENTITY
</#if>
</#list>
</#if>
<select id="selectBy${srfcaseformat(MajorField.codeName,'l_u2lC')?cap_first}" resultMap="${de.codeName}ResultMap">
<select id="selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}" resultMap="${de.codeName}ResultMap">
<#if enableGroup || enableOrderby>
select <#if enableGroup><@outputGroup deDefaultDataSet/><#else>*</#if> from (
</#if>
......@@ -307,3 +307,15 @@ TARGET=PSDATAENTITY
<#macro outputGroup singleSet>
<#list singleSet.getPSDEDataSetGroupParams() as groupParam><#if groupParam_index gt 0>,</#if><#if groupParam.isEnableGroup()><#if groupParam.getGroupCode()??>${groupParam.getGroupCode()}<#else>${groupParam.getName()}</#if><#else>${groupParam.getGroupCode()}</#if> as "${groupParam.getName()?lower_case}"</#list>
</#macro>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -71,7 +71,7 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}"
<#assign targetLogicParam=nodeParam.getDstPSDELogicParam()>
<#assign targetLogicFieldName=nodeParam.getDstFieldName()>
<#if targetLogicParam.getParamPSDataEntity().getPSDEField(targetLogicFieldName,true)??>
<#assign targetLogicFieldName=srfcaseformat(targetLogicParam.getParamPSDataEntity().getPSDEField(targetLogicFieldName,true).getCodeName(),'l_u2lC')>
<#assign targetLogicFieldName=srfr7templcaseformat(targetLogicParam.getParamPSDataEntity().getPSDEField(targetLogicFieldName,true).getCodeName())>
</#if>
<#if nodeParam.getSrcValueType()=='SRCVALUE'><#comment>直接值</#comment>
${logicName+targetLogicParam.getCodeName()?lower_case}.set("${targetLogicFieldName?lower_case}","${nodeParam.getSrcValue()}");
......@@ -79,7 +79,7 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}"
<#assign srcPSDELogicParam=nodeParam.getSrcPSDELogicParam()>
<#assign srcFieldName=nodeParam.getSrcFieldName()>
<#if srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName,true)??>
<#assign srcFieldName=srfcaseformat(srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName,true).getCodeName(),'l_u2lC')>
<#assign srcFieldName=srfr7templcaseformat(srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName,true).getCodeName())>
</#if>
${logicName+targetLogicParam.getCodeName()?lower_case}.set("${targetLogicFieldName?lower_case}",${logicName+srcPSDELogicParam.getCodeName()?lower_case}.get("${srcFieldName?lower_case}"));<#comment>源逻辑参数选择了实体</#comment>
<#else>
......@@ -106,13 +106,13 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}"
<#assign logicParamEntity=logicName+operateParam.codeName?lower_case>
<#if deLogicNode.getDstPSDEAction().codeName?lower_case=='get'>
<#if operateEntity.getKeyPSDEField()??>
<#assign operateEntityKeyField=srfcaseformat(operateEntity.getKeyPSDEField().getCodeName(),'l_u2lC')?cap_first>
<#assign operateEntityKeyField=srfr7templcaseformat(operateEntity.getKeyPSDEField().getCodeName())?cap_first>
${pub.getPKGCodeName()}.util.helper.CachedBeanCopier.copy(${operateEntity.codeName?lower_case}service.get(${logicParamEntity}.get${operateEntityKeyField}()),${logicParamEntity});
<#else>
//操作实体没有主键属性,未能正常发布出get行为
</#if>
<#elseif deLogicNode.getDstPSDEAction().codeName?lower_case=='remove'>
<#assign operateEntityKeyField=srfcaseformat(operateEntity.getKeyPSDEField().getCodeName(),'l_u2lC')?cap_first>
<#assign operateEntityKeyField=srfr7templcaseformat(operateEntity.getKeyPSDEField().getCodeName())?cap_first>
${operateEntity.codeName?lower_case}service.remove(${logicParamEntity}.get${operateEntityKeyField}());
<#else>
${operateEntity.codeName?lower_case}service.${operateAction.codeName?uncap_first}(${logicParamEntity});
......@@ -181,7 +181,7 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}"
}
<#elseif deLogicNode.getLogicNodeType()=='STARTWF'><#comment>启动工作流</#comment>
<#assign wfDE=deLogicNode.getPSDEWF().getPSDataEntity()>
<#assign wfDEKeyField=srfcaseformat(wfDE.getKeyPSDEField().codeName,'l_u2lC')>
<#assign wfDEKeyField=srfr7templcaseformat(wfDE.getKeyPSDEField().codeName)>
<#assign wfParam=deLogicNode.getDstPSDELogicParam()>
<#assign wfLogicParam=(logicName+wfParam.codeName)?lower_case>
<#assign wfDECodeName=srfpluralize(wfDE.getCodeName()?lower_case)>
......@@ -222,7 +222,7 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}"
<#if nodeParam.getSrcValueType()=='SRCDLPARAM'><#comment>源逻辑参数</#comment>
<#assign srcPSDELogicParam=nodeParam.getSrcPSDELogicParam()>
<#if srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName,true)??>
<#assign srcFieldName=srfcaseformat(srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName,true).getCodeName(),'l_u2lC')>
<#assign srcFieldName=srfr7templcaseformat(srcPSDELogicParam.getParamPSDataEntity().getPSDEField(srcFieldName,true).getCodeName())>
</#if>
<#assign srfLogicParamEntity=logicName+srcPSDELogicParam.getCodeName()?lower_case>
<#assign sqlParam=srfLogicParamEntity+".get(\""+srcFieldName?lower_case+"\")">
......@@ -251,4 +251,16 @@ ruleflow-group "${logicName+deLogicNode.getCodeName()?lower_case}"
<#assign sql=sql?replace("?","#"+"{et.param"+nodeParam_index+"}","f")>
</#list>
String strSql="${sql}";
</#macro>
\ No newline at end of file
</#macro>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -151,7 +151,7 @@ TARGET=PSDELOGIC
<#assign targetDBValueOP=LogicLinkCond.getPSDBValueOPId()><#comment>表达式</#comment>
<#assign targetValue=LogicLinkCond.getValue()><#comment>值项</#comment>
<#if targetDEField!=''>
<#assign targetFieldName=srfcaseformat(targetDEField.codeName,'l_u2lC')>
<#assign targetFieldName=srfr7templcaseformat(targetDEField.codeName)>
</#if>
<#assign condBody="RuleUtils.test($"+logicName+targetParam.getCodeName()?lower_case+".get(\""+targetFieldName+"\"),\""+targetDBValueOP+"\","+"\""+targetValue+"\")">
<#assign fieldCond=fieldCond+condBody >
......@@ -176,3 +176,15 @@ TARGET=PSDELOGIC
</#list>
<#return expressionCond/>
</#function>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -32,7 +32,7 @@ TARGET=PSDEACTION
<#assign dataentity = afterlogic.getDstPSDE()>
<#assign deaction = afterlogic.getDstPSDEAction()>
<#if !P.exists("refservice",dataentity+"service")>
<tns:metaData express="T(${pub.getPKGCodeName()}.util.security.SpringContextHolder).getBean(T(${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service))" name="${srfcaseformat(dataentity.getCodeName(),'l_u2lC')}Service" type="service"/>
<tns:metaData express="T(${pub.getPKGCodeName()}.util.security.SpringContextHolder).getBean(T(${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service))" name="${srfr7templcaseformat(dataentity.getCodeName())}Service" type="service"/>
</#if>
</#if>
</#list>
......@@ -70,3 +70,15 @@ TARGET=PSDEACTION
</process>
</definitions>
</#if>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -11,7 +11,7 @@ TARGET=PSDEACTION
<#assign hasAfterLogic=true>
<#assign dataentity = afterlogic.getDstPSDE()>
<#if !P.exists("refservice",dataentity+"service")>
global ${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service ${srfcaseformat(dataentity.getCodeName(),'l_u2lC')}Service;
global ${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service ${srfr7templcaseformat(dataentity.getCodeName())}Service;
</#if>
</#if>
</#if>
......@@ -84,14 +84,26 @@ global ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower
<#assign actionLogicDEAction=actionlogic.getDstPSDEAction()>
${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()} actionLogicDE =new ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()}();
et.copyTo(actionLogicDE,true);
${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.${srfmethodname(actionLogicDEAction.getCodeName())}(actionLogicDE);
${srfr7templcaseformat(actionLogicDE.getCodeName())}Service.${srfmethodname(actionLogicDEAction.getCodeName())}(actionLogicDE);
</#macro>
<#comment>实体行为附加逻辑-remove</#comment>
<#macro actionLogic_remove actionlogic>
<#if de.getKeyPSDEField().getStdDataType()==actionLogicDE.getKeyPSDEField().getStdDataType()>
<#assign privateCodeName = srfcaseformat(de.getKeyPSDEField().getCodeName(),'l_u2lC') >
<#assign privateCodeName = srfr7templcaseformat(de.getKeyPSDEField().getCodeName()) >
<#assign publicCodeName = privateCodeName?cap_first >
${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.remove(et.get${publicCodeName}());
${srfr7templcaseformat(actionLogicDE.getCodeName())}Service.remove(et.get${publicCodeName}());
</#if>
</#macro>
\ No newline at end of file
</#macro>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -32,7 +32,7 @@ TARGET=PSDEACTION
<#assign dataentity = beforelogic.getDstPSDE()>
<#assign deaction = beforelogic.getDstPSDEAction()>
<#if !P.exists("refservice",dataentity+"service")>
<tns:metaData express="T(${pub.getPKGCodeName()}.util.security.SpringContextHolder).getBean(T(${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service))" name="${srfcaseformat(dataentity.getCodeName(),'l_u2lC')}Service" type="service"/>
<tns:metaData express="T(${pub.getPKGCodeName()}.util.security.SpringContextHolder).getBean(T(${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service))" name="${srfr7templcaseformat(dataentity.getCodeName())}Service" type="service"/>
</#if>
</#if>
</#list>
......@@ -70,3 +70,15 @@ TARGET=PSDEACTION
</process>
</definitions>
</#if>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -11,7 +11,7 @@ TARGET=PSDEACTION
<#assign hasBeforeLogic=true>
<#assign dataentity = beforelogic.getDstPSDE()>
<#if !P.exists("refservice",dataentity+"service")>
global ${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service ${srfcaseformat(dataentity.getCodeName(),'l_u2lC')}Service;
global ${pub.getPKGCodeName()}.core.${dataentity.getPSSystemModule().codeName?lower_case}.service.I${dataentity.codeName}Service ${srfr7templcaseformat(dataentity.getCodeName())}Service;
</#if>
</#if>
</#if>
......@@ -84,14 +84,26 @@ global ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower
<#assign actionLogicDEAction=actionlogic.getDstPSDEAction()>
${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()} actionLogicDE =new ${pub.getPKGCodeName()}.core.${actionLogicDE.getPSSystemModule().getCodeName()?lower_case}.domain.${actionLogicDE.getCodeName()}();
et.copyTo(actionLogicDE,true);
${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.${srfmethodname(actionLogicDEAction.getCodeName())}(actionLogicDE);
${srfr7templcaseformat(actionLogicDE.getCodeName())}Service.${srfmethodname(actionLogicDEAction.getCodeName())}(actionLogicDE);
</#macro>
<#comment>实体行为附加逻辑-remove</#comment>
<#macro actionLogic_remove actionlogic>
<#if de.getKeyPSDEField().getStdDataType()==actionLogicDE.getKeyPSDEField().getStdDataType()>
<#assign privateCodeName = srfcaseformat(de.getKeyPSDEField().getCodeName(),'l_u2lC') >
<#assign privateCodeName = srfr7templcaseformat(de.getKeyPSDEField().getCodeName()) >
<#assign publicCodeName = privateCodeName?cap_first >
${srfcaseformat(actionLogicDE.getCodeName(),'l_u2lC')}Service.remove(et.get${publicCodeName}());
${srfr7templcaseformat(actionLogicDE.getCodeName())}Service.remove(et.get${publicCodeName}());
</#if>
</#macro>
\ No newline at end of file
</#macro>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -66,7 +66,7 @@ public class ${item.getCodeName()}DTO extends ${dtoBase} implements Serializable
<#list item.getPSDEServiceAPIFields() as apifield>
<#assign defDataType = (apifield.getPSDEField().getDataType())!"">
<#assign columnname = apifield.getName()?lower_case>
<#assign prvateCodeName = srfcaseformat(apifield.getCodeName(),'l_u2lC') >
<#assign prvateCodeName = srfr7templcaseformat(apifield.getCodeName()) >
<#assign publicCodeName = prvateCodeName?cap_first >
<#assign jsonfield = apifield.getCodeName()?lower_case >
<#assign defield=(apifield.getPSDEField())!"">
......@@ -105,7 +105,7 @@ public class ${item.getCodeName()}DTO extends ${dtoBase} implements Serializable
<#assign defield = apifield.getPSDEField() >
<#assign defDataType = (defield.getDataType())!"">
<#assign columnname = apifield.getName()?lower_case>
<#assign prvateCodeName = srfcaseformat(apifield.getCodeName(),'l_u2lC') >
<#assign prvateCodeName = srfr7templcaseformat(apifield.getCodeName()) >
<#assign publicCodeName = prvateCodeName?cap_first >
<#if defield.isPhisicalDEField()==true && defield.isKeyDEField()==false && defDataType!='ONE2MANYDATA'>
<#if defield.getPredefinedType()?? && defield.getPredefinedType()!=''>
......@@ -129,8 +129,8 @@ public class ${item.getCodeName()}DTO extends ${dtoBase} implements Serializable
<#assign der = apider.getPSDER1N() >
<#if apider.getMinorPSDEServiceAPI().isNested()>
<#assign subDTOs = srfpluralize(apider.getMinorPSDEServiceAPI().getCodeName())?lower_case >
<#assign subcode = srfcaseformat((der.getMinorCodeName()!der.getMinorPSDataEntity().getCodeName()),'l_u2lC') >
<#if subcode?? && subcode==''><#assign subcode=srfcaseformat(der.getMinorPSDataEntity().getCodeName(),'l_u2lC')></#if>
<#assign subcode = srfr7templcaseformat((der.getMinorCodeName()!der.getMinorPSDataEntity().getCodeName())) >
<#if subcode?? && subcode==''><#assign subcode=srfr7templcaseformat(der.getMinorPSDataEntity().getCodeName())></#if>
/**
* [${apider.getMinorPSDEServiceAPI().getName()}]
*/
......@@ -198,4 +198,16 @@ public class ${item.getCodeName()}DTO extends ${dtoBase} implements Serializable
</#list>
})
</#if>
</#macro>
\ No newline at end of file
</#macro>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -30,7 +30,7 @@ public interface ${item.getCodeName()}Mapping extends MappingBase<${item.codeNam
<#--<#if first==true>-->
<#--@Mappings({-->
<#--</#if>-->
<#--<#assign subcode = srfcaseformat((der.getMinorCodeName()!der.getMinorPSDataEntity().getCodeName()),'l_u2lC') >-->
<#--<#assign subcode = srfr7templcaseformat((der.getMinorCodeName()!der.getMinorPSDataEntity().getCodeName())) >-->
<#--<#if first==false>,</#if>@Mapping(target = "${subcode}", ignore = true )-->
<#--<#assign first=false>-->
<#--</#if>-->
......@@ -45,3 +45,14 @@ public interface ${item.getCodeName()}Mapping extends MappingBase<${item.codeNam
}
</#if>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -10,9 +10,9 @@ TARGET=PSDESERVICEAPI
<#assign itemCodeNameLC = itemCodeName?lower_case>
<#assign deCodeName = de.getCodeName()>
<#assign deLogicName = de.getLogicName()>
<#assign deCodeNameCamel = srfcaseformat(deCodeName,'l_u2lC')?cap_first>
<#assign deCodeNameCamel = srfr7templcaseformat(deCodeName)?cap_first>
<#assign deCodeNameLC = deCodeName?lower_case>
<#assign dePKCodeNameLC = srfcaseformat(de.getKeyPSDEField().getCodeName(),'l_u2lC')>
<#assign dePKCodeNameLC = srfr7templcaseformat(de.getKeyPSDEField().getCodeName())>
<#assign dePKCodeName = (dePKCodeNameLC)?cap_first>
<#assign deModelCodeNameLC = de.getPSSystemModule().getCodeName()?lower_case>
<#assign itemSysApiCodeName = item.getPSSysServiceAPI().getCodeName()>
......@@ -420,7 +420,7 @@ public class ${itemCodeName}Resource {
<#assign byTagParams += rsMainDeLogicName >
<#if rs.getPSDER1N()?? && apiRsPathLast.getCodeName() == rs.getCodeName()>
<#assign parentSearchParams += "context.setN_" + rs.getPSDER1N().getPSPickupDEField().getName()?lower_case + "_eq("+ rsMainDeCNLC + keyCNLC +");" >
<#assign parentSetParams += "domain.set" + srfcaseformat(rs.getPSDER1N().getPSPickupDEField().getCodeName(),'l_u2lC')?cap_first + "("+ rsMainDeCNLC + keyCNLC +");" >
<#assign parentSetParams += "domain.set" + srfr7templcaseformat(rs.getPSDER1N().getPSPickupDEField().getCodeName())?cap_first + "("+ rsMainDeCNLC + keyCNLC +");" >
</#if>
<#assign parentParams2 += "" + srfr7javatype(rsMainDePKDataType)+" " + rsMainDeCNLC + keyCNLC >
<#assign parentParams3 += "" + rsMainDeCNLC + keyCNLC >
......@@ -789,7 +789,7 @@ public class ${itemCodeName}Resource {
<#assign defield=apifield.getPSDEField()>
<#if defield.getPredefinedType?? && defield.getPredefinedType()??>
<#if defield.getPredefinedType()=='UPDATEDATE'>
<#assign updatedateField=srfcaseformat(defield.codeName,'l_u2lC')>
<#assign updatedateField=srfr7templcaseformat(defield.codeName)>
@VersionCheck(entity = "${deCodeNameLC}" , versionfield = "${updatedateField}")
<#break>
</#if>
......@@ -1089,8 +1089,14 @@ public class ${itemCodeName}Resource {
}
</#macro>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
......@@ -115,7 +115,7 @@ public class ValueRuleValidator implements ConstraintValidator<ValueRuleCheck, D
<#assign targetDBValueOP=fieldRule.getCondOp()><#comment>表达式</#comment>
<#assign targetValue=((fieldRule.getParamValue())!'')><#comment>值项</#comment>
<#if targetDEField!=''>
<#assign targetFieldName=srfcaseformat(targetDEField.codeName,'l_u2lC')>
<#assign targetFieldName=srfr7templcaseformat(targetDEField.codeName)>
</#if>
<#assign condBody="T(${pub.getPKGCodeName()}.util.helper.RuleUtils).test(#dto.get(\\\""+targetFieldName+"\\\"),\\\""+targetDBValueOP+"\\\","+"\\\""+targetValue+"\\\")">
</#if>
......@@ -152,4 +152,16 @@ public class ValueRuleValidator implements ConstraintValidator<ValueRuleCheck, D
<#assign fieldMessage=fieldRule.getRuleInfo()>
</#if>
<#return fieldMessage/>
</#function>
\ No newline at end of file
</#function>
<#comment>替换参数驼峰命名</#comment>
<#function srfr7templcaseformat codeName>
<#assign result = codeName>
<#if pub.getParam("cam") == "true">
<#assign result = srfcaseformat(codeName,'UC2l_u')>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
<#else>
<#assign result = srfcaseformat(codeName,'l_u2lC')>
</#if>
<#return result>
</#function>
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册