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/modelcombination.ts | 35 +++++++++++++++++++++++++----------
1 files changed, 25 insertions(+), 10 deletions(-)
diff --git a/src/app/modules/business/controller/admin/modelcombination.ts b/src/app/modules/business/controller/admin/modelcombination.ts
index 144ca20..d055411 100644
--- a/src/app/modules/business/controller/admin/modelcombination.ts
+++ b/src/app/modules/business/controller/admin/modelcombination.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 { Modelcombination } from '../../entity/modelcombination';
import { ModelcombinationService } from '../../service/modelcombination';
import { DataController } from '../../../base/controller/dataController';
/**
- * 缁勫悎妯″瀷
- */
+聽 聽 聽 聽 * 缁勫悎妯″瀷
+聽 聽 聽 聽 */
@Provide()
-@CoolController({
- api: ['add', 'delete', 'update', 'list'],
- entity: Modelcombination,
- service: ModelcombinationService,
+@CoolController({
+ 聽api: ['add', 'delete', 'update', 'list'],
+ 聽entity: Modelcombination,
+ 聽service: ModelcombinationService,
})
-export class AdminModelcombinationController extends DataController {
- @Inject()
- modelcombinationService: ModelcombinationService;
+export class ModelcombinationController extends DataController {
+ 聽@Inject()
+ 聽modelcombinationService: ModelcombinationService;
+ 聽
+ /**
+ * 鑾峰緱鏁版嵁
+ */
+ 聽 @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