提交 07a14312 编写于 作者: tony001's avatar tony001

数据服务fetch增加post请求方式 --- fix1

上级 d1ca48a7
......@@ -515,7 +515,7 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
<#-- 查询数据集(post方式)start -->
<#if singleAppMethod.getMethodType?? && singleAppMethod.getMethodType()?? && singleAppMethod.getMethodType() == "FETCH">
<#assign dataSet = singleAppMethod.getPSDEDataSet() />
/**
* search${dataSet.getCodeName()}接口方法
*
......@@ -526,7 +526,27 @@ export default class ${srfclassname('${item.getCodeName()}')}ServiceBase extends
* @memberof ${srfclassname('${item.getCodeName()}')}ServiceBase
*/
public async search${dataSet.getCodeName()}(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return null;
<#if item.getPSAppDERSPathCount() gt 0 && singleServiceApi??>
<#list 1..item.getPSAppDERSPathCount() as count>
<#assign path = ''/>
<#assign condition = ''/>
<#list item.getPSAppDERSPath(count_index) as deRSPath>
<#if deRSPath.getMajorPSAppDataEntity?? && deRSPath.getMajorPSAppDataEntity()??>
<#assign _dataEntity = deRSPath.getMajorPSAppDataEntity()/>
<#assign condition>${condition}context.${_dataEntity.getCodeName()?lower_case} && </#assign>
<#assign path>${path}${srfpluralize(_dataEntity.codeName)?lower_case}/<#noparse>$</#noparse>{context.${_dataEntity.getCodeName()?lower_case}}/</#assign>
</#if>
</#list>
if(${condition}true){
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().post(`/${path}${srfpluralize(item.codeName)?lower_case}/search${dataSet.getCodeName()?lower_case}`,tempData,isloading);
}
</#list>
</#if>
<#if item.isMajor()>
let tempData:any = JSON.parse(JSON.stringify(data));
return Http.getInstance().post(`/${srfpluralize(item.codeName)?lower_case}/search${dataSet.getCodeName()?lower_case}`,tempData,isloading);
</#if>
}
</#if>
<#-- 查询数据集(post方式)end -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册