提交 a7708b8d 编写于 作者: KK's avatar KK

部件服务调整

上级 baf57a60
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
if (Object.is(serviceName, '${srfclassname(_appde.getCodeName())}Service') && Object.is(interfaceName, '${deDataSet.getCodeName()}')) { if (Object.is(serviceName, '${srfclassname(_appde.getCodeName())}Service') && Object.is(interfaceName, '${deDataSet.getCodeName()}')) {
await this.onBeforeAction(interfaceName, context, data, isLoading); await this.onBeforeAction(interfaceName, context, data, isLoading);
const response: any = await this.service.${deDataSet.getCodeName()}(data); const response: any = await this.service.${deDataSet.getCodeName()}(data);
await this.onAfterAction(interfaceName, context, response);
return this.doItems(response); return this.doItems(response);
} }
<#else> <#else>
...@@ -31,7 +30,6 @@ ...@@ -31,7 +30,6 @@
const service: any = await this.getService('${_appde.getCodeName()?lower_case}'); const service: any = await this.getService('${_appde.getCodeName()?lower_case}');
await this.onBeforeAction(interfaceName, context, data, isLoading); await this.onBeforeAction(interfaceName, context, data, isLoading);
const response: any = await service.${deDataSet.getCodeName()}(data); const response: any = await service.${deDataSet.getCodeName()}(data);
await this.onAfterAction(interfaceName, context, response);
return this.doItems(response); return this.doItems(response);
} }
</#if> </#if>
......
...@@ -57,10 +57,8 @@ ...@@ -57,10 +57,8 @@
</#list> </#list>
</#if> </#if>
} catch (response) { } catch (response) {
await this.onAfterAction('', context, response);
return new HttpResponse(response.status); return new HttpResponse(response.status);
} }
await this.onAfterAction('', context);
return new HttpResponse(200, item); return new HttpResponse(200, item);
} }
...@@ -105,7 +103,6 @@ ...@@ -105,7 +103,6 @@
if (!response.isError()) { if (!response.isError()) {
response = this.handleResponse("", response); response = this.handleResponse("", response);
} }
await this.onAfterAction('', context, response);
return new HttpResponse(response.status, response.data, response.error); return new HttpResponse(response.status, response.data, response.error);
} }
...@@ -150,7 +147,6 @@ ...@@ -150,7 +147,6 @@
if (!response.isError()) { if (!response.isError()) {
response = this.handleResponse("", response); response = this.handleResponse("", response);
} }
await this.onAfterAction('', context, response);
return new HttpResponse(response.status, response.data, response.error); return new HttpResponse(response.status, response.data, response.error);
} }
......
...@@ -369,10 +369,8 @@ ...@@ -369,10 +369,8 @@
if (response.status !== 200) { if (response.status !== 200) {
return response; return response;
} }
await this.onAfterAction('', context, response);
return new HttpResponse(200, response.data || []); return new HttpResponse(200, response.data || []);
} }
await this.onAfterAction('', context);
return new HttpResponse(500, null, { code: 100, message: '数据加载异常,${node.getPSAppDEDataSet().getCodeName()}行为不存在' }); return new HttpResponse(500, null, { code: 100, message: '数据加载异常,${node.getPSAppDEDataSet().getCodeName()}行为不存在' });
} }
</#if> </#if>
......
...@@ -53,7 +53,6 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi ...@@ -53,7 +53,6 @@ import ${srfclassname('${aggAppDataEntity.getCodeName()}')}Service from '@/servi
if (response.status === 200) { if (response.status === 200) {
response = this.handleResponse(action, response); response = this.handleResponse(action, response);
} }
await this.onAfterAction(action, context, response);
return response; return response;
} }
</#if> </#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册