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

diff --git a/src/app/modules/business/controller/admin/trubinelocation.ts b/src/app/modules/business/controller/admin/trubinelocation.ts
index b3ab97c..42e52e0 100644
--- a/src/app/modules/business/controller/admin/trubinelocation.ts
+++ b/src/app/modules/business/controller/admin/trubinelocation.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 { Trubinelocation } from '../../entity/trubinelocation';
 import { TrubinelocationService } from '../../service/trubinelocation';
 import { DataController } from '../../../base/controller/dataController';
 /**
-        * 鏂楄疆鏈轰俊鎭�
-        */
+聽 聽 聽 聽 * 鏂楄疆鏈轰俊鎭�
+聽 聽 聽 聽 */
 @Provide()
-@CoolController({
-  api: ['add', 'delete', 'update', 'list'],
-  entity: Trubinelocation,
-  service: TrubinelocationService,
+@CoolController({ 
+ 聽api: ['add', 'delete', 'update', 'list'],
+ 聽entity: Trubinelocation,
+ 聽service: TrubinelocationService,
 })
-export class AdminTrubinelocationController extends DataController {
-  @Inject()
-  trubinelocationService: TrubinelocationService;
+export class TrubinelocationController extends DataController {
+ 聽@Inject()
+ 聽trubinelocationService: TrubinelocationService;
+ 聽
+  /**
+  * 鑾峰緱鏁版嵁
+  */
+ 聽 @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