From 9e3033c25283dff92244ccc0156b3ad1ee409767 Mon Sep 17 00:00:00 2001
From: wangrong <wangrong@shsening.com>
Date: 星期三, 23 三月 2022 10:12:36 +0800
Subject: [PATCH] check the entity
---
src/app/modules/business/controller/admin/execrecord.ts | 35 +++++++++++++++++++++++++----------
1 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/src/app/modules/business/controller/admin/execrecord.ts b/src/app/modules/business/controller/admin/execrecord.ts
index e83cfcf..a360c4b 100644
--- a/src/app/modules/business/controller/admin/execrecord.ts
+++ b/src/app/modules/business/controller/admin/execrecord.ts
@@ -1,18 +1,33 @@
-import { ALL, Body, Inject, Post, Provide } from '@midwayjs/decorator';
+import { ALL, Body, Get, Inject, Post, Provide, Query } from '@midwayjs/decorator';
import { CoolController, BaseController } from '@cool-midway/core';
import { Execrecord } from '../../entity/execrecord';
import { ExecrecordService } from '../../service/execrecord';
import { DataController } from '../../../base/controller/dataController';
/**
- * 浠诲姟鎵ц璁板綍琛�
- */
+聽 聽 聽 聽 * 浠诲姟鎵ц璁板綍
+聽 聽 聽 聽 */
@Provide()
-@CoolController({
- api: ['add', 'delete', 'update', 'list'],
- entity: Execrecord,
- service: ExecrecordService,
+@CoolController({
+ 聽api: ['add', 'delete', 'update', 'list'],
+ 聽entity: Execrecord,
+ 聽service: ExecrecordService,
})
-export class AdminExecrecordController extends DataController {
- @Inject()
- execrecordService: ExecrecordService;
+export class ExecrecordController extends DataController {
+ 聽@Inject()
+ 聽execrecordService: ExecrecordService;
+ 聽
+ /**
+ * 鑾峰緱鏁版嵁
+ */
+ 聽 @Get('/getdata', { summary: '鏁版嵁鎺ュ彛' })
+ 聽 async getData(@Query(ALL) params: any) {
+ 聽 聽 return this.ok(await this.dataService.getData(params));
+ 聽 }
+ /**
+ * 鑾峰緱鏁版嵁
+ */
+ 聽 @Get('/postdata', { summary: '鏁版嵁鎺ュ彛' })
+ 聽 async postData(@Query(ALL) params: any) {
+ 聽 聽 return this.ok(await this.dataService.getData(params));
+ 聽 }
}
\ No newline at end of file
--
Gitblit v1.9.1