提交 31f52428 编写于 作者: neko's avatar neko

update

上级 a31ceeba
......@@ -20,44 +20,44 @@ TARGET=PSAPPDATAENTITY
<#if singleAppMethod.getMethodType() == "SELECT">
if (${condition} && context.${item.getCodeName()?lower_case}) {
<#if singleServiceApi.getRequestMethod() == 'PUT' || singleServiceApi.getRequestMethod() == 'POST'>
return await this.http.${requestMethodName}(`/${path}${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
return this.http.${requestMethodName}(`/${path}${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
<#else>
return await this.http.${requestMethodName}(`/${path}${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`);
return this.http.${requestMethodName}(`/${path}${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`);
</#if>
}
<#-- 方法类型为FETCH -->
<#elseif singleAppMethod.getMethodType() == "FETCH">
if (${condition}) {
return await this.http.${requestMethodName}(`/${path}${item_code_name}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
return this.http.${requestMethodName}(`/${path}${item_code_name}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
}
<#-- 方法类型为FETCHTEMP -->
<#elseif singleAppMethod.getMethodType() == "FETCHTEMP">
if (${condition}) {
return await this.http.${requestMethodName}(`/${path}${item_code_name}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
return this.http.${requestMethodName}(`/${path}${item_code_name}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
}
<#else>
<#-- 方法类型为DEACTION start -->
<#if singleServiceApi.getRequestParamType() == "NONE">
<#-- 无参数情况start -->
if (${condition}) {
return await this.http.${requestMethodName}(`/${path}${item_code_name}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`);
return this.http.${requestMethodName}(`/${path}${item_code_name}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`);
}
<#-- 无参数情况end -->
<#elseif singleServiceApi.getRequestParamType() == "FIELD">
<#-- 指定属性情况start -->
if (${condition} && context.${item.getCodeName()?lower_case}) {
return await this.http.${requestMethodName}(`/${path}${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`);
return this.http.${requestMethodName}(`/${path}${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`);
}
<#-- 指定属性情况start -->
<#elseif singleServiceApi.getRequestParamType() == "ENTITY">
<#-- 提交对象数据情况start -->
<#if singleAppMethod.getCodeName() == 'Create'>
if (${condition}) {
return await this.http.${requestMethodName}(`/${path}${item_code_name}`, data);
return this.http.${requestMethodName}(`/${path}${item_code_name}`, data);
}
<#else>
if (${condition} && context.${item.getCodeName()?lower_case}) {
return await this.http.${requestMethodName}(`/${path}${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
return this.http.${requestMethodName}(`/${path}${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
}
</#if>
<#-- 提交对象数据情况start -->
......@@ -78,16 +78,16 @@ TARGET=PSAPPDATAENTITY
<#-- 方法类型为SELECT -->
<#if singleAppMethod.getMethodType() == "SELECT">
<#if singleServiceApi.getRequestMethod() == 'PUT' || singleServiceApi.getRequestMethod() == 'POST'>
return await this.http.${requestMethodName}(`/${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
return this.http.${requestMethodName}(`/${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
<#else>
return await this.http.${requestMethodName}(`/${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`);
return this.http.${requestMethodName}(`/${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`);
</#if>
<#-- 方法类型为FETCH -->
<#elseif singleAppMethod.getMethodType() == "FETCH">
return await this.http.${requestMethodName}(`/${item_code_name}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
return this.http.${requestMethodName}(`/${item_code_name}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
<#-- 方法类型为FETCHTEMP -->
<#elseif singleAppMethod.getMethodType() == "FETCHTEMP">
return await this.http.${requestMethodName}(`/${item_code_name}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
return this.http.${requestMethodName}(`/${item_code_name}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
<#else>
<#-- 方法类型为DEACTION start -->
<#if singleServiceApi.getRequestParamType() == "NONE">
......@@ -106,9 +106,9 @@ TARGET=PSAPPDATAENTITY
return res;
<#elseif singleServiceApi.getRequestMethod() == "POST">
<#-- REMOVE -->
return await this.http.${requestMethodName}(`/${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
return this.http.${requestMethodName}(`/${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
<#else>
return await this.http.${requestMethodName}(`/${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`);
return this.http.${requestMethodName}(`/${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`);
</#if>
<#-- 指定属性情况start -->
<#elseif singleServiceApi.getRequestParamType() == "ENTITY">
......@@ -130,7 +130,7 @@ TARGET=PSAPPDATAENTITY
await this.setMinorLocalCache(context, res.data);
return res;
<#else>
return await this.http.${requestMethodName}(`/${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
return this.http.${requestMethodName}(`/${item_code_name}/<#noparse>$</#noparse>{context.${item.getCodeName()?lower_case}}<#if singleServiceApi.getRequestPath()??>${singleServiceApi.getRequestPath()}</#if>`, data);
</#if>
<#-- 提交对象数据情况start -->
<#else>
......@@ -286,7 +286,7 @@ TARGET=PSAPPDATAENTITY
</#if>
</#list>
if (${condition}) {
return await this.http.post(`${path}${item_code_name}/${singleAppMethod.getCodeName()?lower_case}`, data);
return this.http.post(`${path}${item_code_name}/${singleAppMethod.getCodeName()?lower_case}`, data);
}
</#list>
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册