From 58389be5d3c1bbf4e47976f7ea09977be8bb84c5 Mon Sep 17 00:00:00 2001
From: master <master@163.com>
Date: 星期四, 07 四月 2022 15:27:38 +0800
Subject: [PATCH] 重写add接口

---
 src/app/modules/business/controller/admin/devicegroup.ts |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/app/modules/business/controller/admin/devicegroup.ts b/src/app/modules/business/controller/admin/devicegroup.ts
index 7804576..43d4573 100644
--- a/src/app/modules/business/controller/admin/devicegroup.ts
+++ b/src/app/modules/business/controller/admin/devicegroup.ts
@@ -1,7 +1,7 @@
 import { ALL, Body, Get, Inject, Post, Provide, Query } from '@midwayjs/decorator';
 import { CoolController, BaseController } from '@cool-midway/core';
 import { Devicegroup } from '../../entity/devicegroup';
-import { DevicegroupService } from '../../service/devicegroup';
+// import { DevicegroupService } from '../../service/devicegroup';
 import { DataController } from '../../../base/controller/dataController';
 /**
         * 璁惧鍒嗙粍
@@ -10,24 +10,24 @@
 @CoolController({
   api: ['add', 'delete', 'update', 'list', 'page', 'info'],
   entity: Devicegroup,
-  service: DevicegroupService,
+  // service: DevicegroupService,
 })
 export class DevicegroupController extends DataController {
-  @Inject()
-  devicegroupService: DevicegroupService;
+  // @Inject()
+  // devicegroupService: DevicegroupService;
 
   /**
   * 鑾峰緱鏁版嵁
   */
-  @Get('/getdata', { summary: '鏁版嵁鎺ュ彛' })
-  async getData(@Query(ALL) params: any) {
-    return this.ok(await this.devicegroupService.getData(params));
-  }
-  /**
-  * 鑾峰緱鏁版嵁
-  */
-  @Post('/postdata', { summary: '鏁版嵁鎺ュ彛' })
-  async postData(@Query(ALL) params: any) {
-    return this.ok(await this.devicegroupService.getData(params));
-  }
+  // @Get('/getdata', { summary: '鏁版嵁鎺ュ彛' })
+  // async getData(@Query(ALL) params: any) {
+  //   return this.ok(await this.devicegroupService.getData(params));
+  // }
+  // /**
+  // * 鑾峰緱鏁版嵁
+  // */
+  // @Post('/postdata', { summary: '鏁版嵁鎺ュ彛' })
+  // async postData(@Query(ALL) params: any) {
+  //   return this.ok(await this.devicegroupService.getData(params));
+  // }
 }
\ No newline at end of file

--
Gitblit v1.9.1