From 78d5094582b942ba2745264fc938c899700ce550 Mon Sep 17 00:00:00 2001
From: wr1207 <wyun001@163.com>
Date: 星期三, 09 三月 2022 09:42:33 +0800
Subject: [PATCH] add datainterface
---
src/app/modules/base/controller/admin/open.ts | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/src/app/modules/base/controller/admin/open.ts b/src/app/modules/base/controller/admin/open.ts
index b5f0ddd..00e32c0 100644
--- a/src/app/modules/base/controller/admin/open.ts
+++ b/src/app/modules/base/controller/admin/open.ts
@@ -12,6 +12,7 @@
import { LoginDTO } from '../../dto/login';
import { BaseSysLoginService } from '../../service/sys/login';
import { BaseSysParamService } from '../../service/sys/param';
+import { DataService } from '../../service/dataapi/dataapi';
/**
* 涓嶉渶瑕佺櫥褰曠殑鍚庡彴鎺ュ彛
@@ -24,6 +25,9 @@
@Inject()
baseSysParamService: BaseSysParamService;
+
+ @Inject()
+ dataService: DataService;
@Inject()
ctx: Context;
@@ -76,4 +80,24 @@
async refreshToken(@Query() refreshToken: string) {
return this.ok(await this.baseSysLoginService.refreshToken(refreshToken));
}
+
+
+ /**
+ * 鑾峰緱鏁版嵁
+ */
+ @Get('/getdata', { summary: '鏁版嵁鎺ュ彛' })
+ async getData(@Query(ALL) params: any) {
+ console.log('-------------------------------------------------------');
+ console.log(params);
+ 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));
+ }
+
}
--
Gitblit v1.9.1