From c73a430d9dbdbf3480e18fe0f18f7a52594e87ab Mon Sep 17 00:00:00 2001 From: smallchill Date: Wed, 18 Nov 2020 10:40:06 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E4=BF=AE=E6=94=B9basic=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../desk/controller/DashBoardController.java | 31 +++++++++++++------ doc/nacos/blade.yaml | 2 +- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/DashBoardController.java b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/DashBoardController.java index 52ccc9d1..6a9d0826 100644 --- a/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/DashBoardController.java +++ b/blade-service/blade-desk/src/main/java/org/springblade/desk/controller/DashBoardController.java @@ -18,7 +18,7 @@ import java.util.Map; /** * 首页 * - * @author zhuangqian + * @author Chill */ @NonDS @RestController @@ -28,15 +28,13 @@ public class DashBoardController { /** * 活跃用户 - * - * @return */ @GetMapping("/dashboard/activities") @ApiOperationSupport(order = 1) @ApiOperation(value = "活跃用户", notes = "活跃用户") public R activities() { - List> list = new ArrayList<>(); + Map map1 = new HashMap<>(16); map1.put("id", "trend-1"); map1.put("updatedAt", "2019-01-01"); @@ -58,14 +56,29 @@ public class DashBoardController { return R.data(list); } + /** + * 用户信息 + */ + @GetMapping("/dashboard/info") + @ApiOperationSupport(order = 2) + @ApiOperation(value = "用户信息", notes = "用户信息") + public R info() { + Map map = new HashMap<>(16); + map.put("id", "trend-1"); + map.put("updatedAt", "2019-01-01"); + map.put("user", Kv.create().set("name", "曲丽丽").set("avatar", "https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png")); + map.put("group", Kv.create().set("name", "高逼格设计天团").set("link", "http://github.com/")); + map.put("project", Kv.create().set("name", "六月迭代").set("link", "http://github.com/")); + map.put("template", "在 @{group} 新建项目 @{project}"); + return R.data(map); + } + /** * 获取消息 - * - * @return */ @GetMapping("/notice/notices") - @ApiOperationSupport(order = 2) + @ApiOperationSupport(order = 3) @ApiOperation(value = "消息", notes = "消息") public R notices() { List> list = new ArrayList<>(); @@ -122,11 +135,9 @@ public class DashBoardController { /** * 获取我的消息 - * - * @return */ @GetMapping("/notice/my-notices") - @ApiOperationSupport(order = 3) + @ApiOperationSupport(order = 4) @ApiOperation(value = "消息", notes = "消息") public R myNotices() { List> list = new ArrayList<>(); diff --git a/doc/nacos/blade.yaml b/doc/nacos/blade.yaml index 5e8be690..f0709db1 100644 --- a/doc/nacos/blade.yaml +++ b/doc/nacos/blade.yaml @@ -136,7 +136,7 @@ blade: #基础认证配置 basic: - method: ALL - pattern: /dashboard/activities + pattern: /dashboard/info username: "blade" password: "blade" #多终端认证配置