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

调整子系统服务

上级 c1a8fee9
...@@ -861,8 +861,9 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -861,8 +861,9 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#comment>Api存储</#comment> <#comment>Api存储</#comment>
<#elseif de.getStorageMode()==4> <#elseif de.getStorageMode()==4>
<#assign serviceApiCodeName=item.getPSSubSysServiceAPI().codeName>
import ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower_case}.client.${item.codeName}FeignClient; import ${pub.getPKGCodeName()}.core.${de.getPSSystemModule().getCodeName()?lower_case}.client.${serviceApiCodeName}FeignClient;
/** /**
* 实体[${item.getLogicName()}] 服务对象接口实现 * 实体[${item.getLogicName()}] 服务对象接口实现
...@@ -873,7 +874,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -873,7 +874,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#comment>引入feignClient</#comment> <#comment>引入feignClient</#comment>
@Autowired @Autowired
${item.codeName}FeignClient ${item.codeName?uncap_first}FeignClient; ${serviceApiCodeName}FeignClient ${serviceApiCodeName?uncap_first}FeignClient;
<#assign keyfield=de.getKeyPSDEField()> <#assign keyfield=de.getKeyPSDEField()>
...@@ -907,7 +908,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -907,7 +908,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public ${item.getCodeName()} get(${srfjavatype(keyfield.stdDataType)} ${keyfield.getCodeName()?lower_case}) { public ${item.getCodeName()} get(${srfjavatype(keyfield.stdDataType)} ${keyfield.getCodeName()?lower_case}) {
<#if item.isEnableAPIStorage()> <#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? > <#if deaction.getPSSubSysServiceAPIDEMethod()?? >
${item.getCodeName()} et=${item.codeName?uncap_first}FeignClient.${deaction.getPSSubSysServiceAPIDEMethod().getCodeName()?uncap_first}(${keyfield.getCodeName()?lower_case}); ${item.getCodeName()} et=${serviceApiCodeName?uncap_first}FeignClient.${deaction.getPSSubSysServiceAPIDEMethod().getCodeName()?uncap_first}(${keyfield.getCodeName()?lower_case});
if(et==null){ if(et==null){
et=new ${item.getCodeName()}(); et=new ${item.getCodeName()}();
et.set${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(${keyfield.getCodeName()?lower_case}); et.set${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(${keyfield.getCodeName()?lower_case});
...@@ -955,7 +956,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -955,7 +956,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public boolean create(${item.getCodeName()} et) { public boolean create(${item.getCodeName()} et) {
<#if item.isEnableAPIStorage()> <#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? > <#if deaction.getPSSubSysServiceAPIDEMethod()?? >
${item.getCodeName()} rt = ${item.codeName?uncap_first}FeignClient.create(et); ${item.getCodeName()} rt = ${serviceApiCodeName?uncap_first}FeignClient.create(et);
if(rt==null) if(rt==null)
return false; return false;
<#comment>1N关系中,在父实体中创建子实体的List集合</#comment> <#comment>1N关系中,在父实体中创建子实体的List集合</#comment>
...@@ -996,7 +997,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -996,7 +997,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public void createBatch(List<${item.codeName}> list){ public void createBatch(List<${item.codeName}> list){
<#if item.isEnableAPIStorage()> <#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? > <#if deaction.getPSSubSysServiceAPIDEMethod()?? >
${item.codeName?uncap_first}FeignClient.createBatch(list) ; ${serviceApiCodeName?uncap_first}FeignClient.createBatch(list) ;
</#if> </#if>
</#if> </#if>
} }
...@@ -1006,7 +1007,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1006,7 +1007,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public boolean update(${item.getCodeName()} et) { public boolean update(${item.getCodeName()} et) {
<#if item.isEnableAPIStorage()> <#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? > <#if deaction.getPSSubSysServiceAPIDEMethod()?? >
${item.getCodeName()} rt = ${item.codeName?uncap_first}FeignClient.update(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(),et); ${item.getCodeName()} rt = ${serviceApiCodeName?uncap_first}FeignClient.update(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(),et);
if(rt==null) if(rt==null)
return false; return false;
<#comment>1N关系中,在父实体中创建子实体的List集合</#comment> <#comment>1N关系中,在父实体中创建子实体的List集合</#comment>
...@@ -1048,7 +1049,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1048,7 +1049,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public void updateBatch(List<${item.codeName}> list){ public void updateBatch(List<${item.codeName}> list){
<#if item.isEnableAPIStorage()> <#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? > <#if deaction.getPSSubSysServiceAPIDEMethod()?? >
${item.codeName?uncap_first}FeignClient.updateBatch(list) ; ${serviceApiCodeName?uncap_first}FeignClient.updateBatch(list) ;
</#if> </#if>
</#if> </#if>
} }
...@@ -1060,7 +1061,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1060,7 +1061,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if item.isEnableAPIStorage()> <#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? > <#if deaction.getPSSubSysServiceAPIDEMethod()?? >
if(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()==null) et.set${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}((${srfjavatype(keyfield.stdDataType)})et.getDefaultKey(true)); if(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}()==null) et.set${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}((${srfjavatype(keyfield.stdDataType)})et.getDefaultKey(true));
if(!${item.codeName?uncap_first}FeignClient.save(et)) if(!${serviceApiCodeName?uncap_first}FeignClient.save(et))
return false; return false;
<#comment>1N关系中,在父实体中创建子实体的List集合</#comment> <#comment>1N关系中,在父实体中创建子实体的List集合</#comment>
<#if de.getMajorPSDERs?? && de.getMajorPSDERs()??> <#if de.getMajorPSDERs?? && de.getMajorPSDERs()??>
...@@ -1100,7 +1101,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1100,7 +1101,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public void saveBatch(List<${item.getCodeName()}> list) { public void saveBatch(List<${item.getCodeName()}> list) {
<#if item.isEnableAPIStorage()> <#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? > <#if deaction.getPSSubSysServiceAPIDEMethod()?? >
${item.codeName?uncap_first}FeignClient.saveBatch(list) ; ${serviceApiCodeName?uncap_first}FeignClient.saveBatch(list) ;
</#if> </#if>
</#if> </#if>
} }
...@@ -1119,7 +1120,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1119,7 +1120,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#if> </#if>
<#if item.isEnableAPIStorage()> <#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? > <#if deaction.getPSSubSysServiceAPIDEMethod()?? >
return ${item.codeName?uncap_first}FeignClient.remove(${keyfield.getCodeName()?lower_case}) ; return ${serviceApiCodeName?uncap_first}FeignClient.remove(${keyfield.getCodeName()?lower_case}) ;
<#else> <#else>
return false; return false;
</#if> </#if>
...@@ -1131,7 +1132,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1131,7 +1132,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public void removeBatch(Collection<${srfjavatype(keyfield.stdDataType)}> idList){ public void removeBatch(Collection<${srfjavatype(keyfield.stdDataType)}> idList){
<#if item.isEnableAPIStorage()> <#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? > <#if deaction.getPSSubSysServiceAPIDEMethod()?? >
${item.codeName?uncap_first}FeignClient.removeBatch(idList); ${serviceApiCodeName?uncap_first}FeignClient.removeBatch(idList);
</#if> </#if>
</#if> </#if>
} }
...@@ -1141,7 +1142,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1141,7 +1142,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public ${item.getCodeName()} getDraft(${item.getCodeName()} et) { public ${item.getCodeName()} getDraft(${item.getCodeName()} et) {
<#if item.isEnableAPIStorage()> <#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? > <#if deaction.getPSSubSysServiceAPIDEMethod()?? >
return ${item.codeName?uncap_first}FeignClient.getDraft(); return ${serviceApiCodeName?uncap_first}FeignClient.getDraft();
<#else> <#else>
return null; return null;
</#if> </#if>
...@@ -1155,7 +1156,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1155,7 +1156,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public boolean checkKey(${item.getCodeName()} et) { public boolean checkKey(${item.getCodeName()} et) {
<#if item.isEnableAPIStorage()> <#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? > <#if deaction.getPSSubSysServiceAPIDEMethod()?? >
return ${item.codeName?uncap_first}FeignClient.checkKey(et); return ${serviceApiCodeName?uncap_first}FeignClient.checkKey(et);
<#else> <#else>
return false; return false;
</#if> </#if>
...@@ -1168,7 +1169,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1168,7 +1169,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public ${item.getCodeName()} ${srfmethodname(deaction.getCodeName())}(${item.getCodeName()} et) { public ${item.getCodeName()} ${srfmethodname(deaction.getCodeName())}(${item.getCodeName()} et) {
<#if item.isEnableAPIStorage()> <#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? > <#if deaction.getPSSubSysServiceAPIDEMethod()?? >
return ${item.codeName?uncap_first}FeignClient.${deaction.getPSSubSysServiceAPIDEMethod().getCodeName()?uncap_first}(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(),et); return ${serviceApiCodeName?uncap_first}FeignClient.${deaction.getPSSubSysServiceAPIDEMethod().getCodeName()?uncap_first}(et.get${srfcaseformat(keyfield.codeName,'l_u2lC')?cap_first}(),et);
<#else> <#else>
return null; return null;
</#if> </#if>
...@@ -1201,7 +1202,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1201,7 +1202,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
${item.getCodeName()}SearchContext context=new ${item.getCodeName()}SearchContext(); ${item.getCodeName()}SearchContext context=new ${item.getCodeName()}SearchContext();
context.setSize(Integer.MAX_VALUE); context.setSize(Integer.MAX_VALUE);
context.setN_${MajorField.name?lower_case}_eq(${MajorkeyField.codeName?lower_case}); context.setN_${MajorField.name?lower_case}_eq(${MajorkeyField.codeName?lower_case});
return ${item.codeName?uncap_first}FeignClient.search${deDefaultDataSet.getCodeName()}(context).getContent(); return ${serviceApiCodeName?uncap_first}FeignClient.search${deDefaultDataSet.getCodeName()}(context).getContent();
} }
@Override @Override
...@@ -1273,7 +1274,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -1273,7 +1274,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public Page<${item.getCodeName()}> search${dedataset.getCodeName()}(${item.getCodeName()}SearchContext context) { public Page<${item.getCodeName()}> search${dedataset.getCodeName()}(${item.getCodeName()}SearchContext context) {
<#--<#if item.isEnableNoSQLStorage() && item.getAllPSDEDBTables()??>--> <#--<#if item.isEnableNoSQLStorage() && item.getAllPSDEDBTables()??>-->
<#--<#list item.getAllPSDEDBTables() as detable>--> <#--<#list item.getAllPSDEDBTables() as detable>-->
Page<${de.getCodeName()}> ${de.getCodeName()?uncap_first}s=${item.codeName?uncap_first}FeignClient.search${dedataset.getCodeName()}(context); Page<${de.getCodeName()}> ${de.getCodeName()?uncap_first}s=${serviceApiCodeName?uncap_first}FeignClient.search${dedataset.getCodeName()}(context);
return ${de.getCodeName()?uncap_first}s; return ${de.getCodeName()?uncap_first}s;
<#--</#list>--> <#--</#list>-->
<#--<#else>--> <#--<#else>-->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册