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

部件服务调整

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