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

调整子系统服务

上级 c1a8fee9
......@@ -861,8 +861,9 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#comment>Api存储</#comment>
<#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()}] 服务对象接口实现
......@@ -873,7 +874,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#comment>引入feignClient</#comment>
@Autowired
${item.codeName}FeignClient ${item.codeName?uncap_first}FeignClient;
${serviceApiCodeName}FeignClient ${serviceApiCodeName?uncap_first}FeignClient;
<#assign keyfield=de.getKeyPSDEField()>
......@@ -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}) {
<#if item.isEnableAPIStorage()>
<#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){
et=new ${item.getCodeName()}();
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
public boolean create(${item.getCodeName()} et) {
<#if item.isEnableAPIStorage()>
<#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)
return false;
<#comment>1N关系中,在父实体中创建子实体的List集合</#comment>
......@@ -996,7 +997,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public void createBatch(List<${item.codeName}> list){
<#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? >
${item.codeName?uncap_first}FeignClient.createBatch(list) ;
${serviceApiCodeName?uncap_first}FeignClient.createBatch(list) ;
</#if>
</#if>
}
......@@ -1006,7 +1007,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public boolean update(${item.getCodeName()} et) {
<#if item.isEnableAPIStorage()>
<#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)
return false;
<#comment>1N关系中,在父实体中创建子实体的List集合</#comment>
......@@ -1048,7 +1049,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public void updateBatch(List<${item.codeName}> list){
<#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? >
${item.codeName?uncap_first}FeignClient.updateBatch(list) ;
${serviceApiCodeName?uncap_first}FeignClient.updateBatch(list) ;
</#if>
</#if>
}
......@@ -1060,7 +1061,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#if item.isEnableAPIStorage()>
<#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(!${item.codeName?uncap_first}FeignClient.save(et))
if(!${serviceApiCodeName?uncap_first}FeignClient.save(et))
return false;
<#comment>1N关系中,在父实体中创建子实体的List集合</#comment>
<#if de.getMajorPSDERs?? && de.getMajorPSDERs()??>
......@@ -1100,7 +1101,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public void saveBatch(List<${item.getCodeName()}> list) {
<#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? >
${item.codeName?uncap_first}FeignClient.saveBatch(list) ;
${serviceApiCodeName?uncap_first}FeignClient.saveBatch(list) ;
</#if>
</#if>
}
......@@ -1119,7 +1120,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
</#if>
<#if item.isEnableAPIStorage()>
<#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>
return false;
</#if>
......@@ -1131,7 +1132,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public void removeBatch(Collection<${srfjavatype(keyfield.stdDataType)}> idList){
<#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? >
${item.codeName?uncap_first}FeignClient.removeBatch(idList);
${serviceApiCodeName?uncap_first}FeignClient.removeBatch(idList);
</#if>
</#if>
}
......@@ -1141,7 +1142,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public ${item.getCodeName()} getDraft(${item.getCodeName()} et) {
<#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? >
return ${item.codeName?uncap_first}FeignClient.getDraft();
return ${serviceApiCodeName?uncap_first}FeignClient.getDraft();
<#else>
return null;
</#if>
......@@ -1155,7 +1156,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public boolean checkKey(${item.getCodeName()} et) {
<#if item.isEnableAPIStorage()>
<#if deaction.getPSSubSysServiceAPIDEMethod()?? >
return ${item.codeName?uncap_first}FeignClient.checkKey(et);
return ${serviceApiCodeName?uncap_first}FeignClient.checkKey(et);
<#else>
return false;
</#if>
......@@ -1168,7 +1169,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
public ${item.getCodeName()} ${srfmethodname(deaction.getCodeName())}(${item.getCodeName()} et) {
<#if item.isEnableAPIStorage()>
<#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>
return null;
</#if>
......@@ -1201,7 +1202,7 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
${item.getCodeName()}SearchContext context=new ${item.getCodeName()}SearchContext();
context.setSize(Integer.MAX_VALUE);
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
......@@ -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) {
<#--<#if item.isEnableNoSQLStorage() && item.getAllPSDEDBTables()??>-->
<#--<#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;
<#--</#list>-->
<#--<#else>-->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册