import { ControlVOBase } from '@/core/modules'; import { IContext, IParam } from '../../common'; import { IHttpResponse } from '../common'; /** * 部件服务接口 * * @export * @interface ICtrlService */ export interface ICtrlService { /** * 处理请求前数据 * * @param {IContext} context * @param {IParam} data * @memberof ICtrlService */ handleRequestData(context: IContext, data: IParam): void; /** * 处理请求后 * * @param {IHttpResponse} response * @param {IParam} [opts] * @return {*} {IHttpResponse} * @memberof ICtrlService */ handleResponse(response: IHttpResponse, opts?: IParam): IHttpResponse; /** * 创建VO模型 * * @param {IParam} DO * @param {string} [controlVoName] 多实体时需传入vo类名 * @return {*} {T} * @memberof ICtrlService */ newControlVO(DO: IParam, controlVoName?: string): T; /** * 前台逻辑 * * @param {string} action * @param {IContext} [context] * @param {IParam} [params] * @return {*} {Promise} * @memberof ICtrlService */ frontLogic( action: string, context?: IContext, params?: IParam ): Promise; [key: string]: any; }