lrf 2 rokov pred
rodič
commit
45948ef9b2

+ 3 - 0
src/controller/BaseController.ts

@@ -1,5 +1,8 @@
 import { Application, Context } from '@midwayjs/koa';
 import { App, Inject } from '@midwayjs/decorator';
+/**
+ * controller基类,有一些基础函数需要实现
+ */
 export abstract class BaseController {
   @App()
   app: Application;

+ 5 - 0
src/index.ts

@@ -1 +1,6 @@
 export { FreeConfiguration as Configuration } from './configuration';
+export { BaseController } from './controller/BaseController';
+export { BaseService } from './service/BaseService';
+export { FrameworkErrorEnum, ServiceError } from './error/service.error';
+export { SearchBase } from './interface/SearchBase';
+export { VOBase } from './interface/VOBase';

+ 0 - 1
src/middleware/response.middleware.ts

@@ -1,7 +1,6 @@
 import { IMiddleware } from '@midwayjs/core';
 import { Middleware } from '@midwayjs/decorator';
 import { NextFunction, Context } from '@midwayjs/koa';
-import _ = require('lodash');
 import { VOBase } from '../interface/VOBase';
 @Middleware()
 export class ResponseMiddleware implements IMiddleware<Context, NextFunction> {

+ 1 - 1
src/service/BaseService.ts

@@ -5,7 +5,7 @@ import { App, Inject } from '@midwayjs/decorator';
 import _ = require('lodash');
 import { FrameworkErrorEnum, ServiceError } from '../error/service.error';
 /**
- * Service基类
+ * Service基类,实现了一些基础的crud
  */
 export abstract class BaseService<T extends AnyParamConstructor<any>> {
   @App()