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/basedevicesection.ts |   35 +++++++++++++++++++++++++----------
 1 files changed, 25 insertions(+), 10 deletions(-)

diff --git a/src/app/modules/business/controller/admin/basedevicesection.ts b/src/app/modules/business/controller/admin/basedevicesection.ts
index f1d1321..25da47e 100644
--- a/src/app/modules/business/controller/admin/basedevicesection.ts
+++ b/src/app/modules/business/controller/admin/basedevicesection.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 { Basedevicesection } from '../../entity/basedevicesection';
 import { BasedevicesectionService } from '../../service/basedevicesection';
 import { DataController } from '../../../base/controller/dataController';
 /**
-        * 璁惧缁勪欢
-        */
+聽 聽 聽 聽 * 璁惧缁勪欢
+聽 聽 聽 聽 */
 @Provide()
-@CoolController({
-  api: ['add', 'delete', 'update', 'list', 'page'],
-  entity: Basedevicesection,
-  service: BasedevicesectionService,
+@CoolController({ 
+ 聽api: ['add', 'delete', 'update', 'list'],
+ 聽entity: Basedevicesection,
+ 聽service: BasedevicesectionService,
 })
-export class AdminBasedevicesectionController extends DataController {
-  @Inject()
-  basedevicesectionService: BasedevicesectionService;
+export class BasedevicesectionController extends DataController {
+ 聽@Inject()
+ 聽basedevicesectionService: BasedevicesectionService;
+ 聽
+  /**
+  * 鑾峰緱鏁版嵁
+  */
+ 聽 @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