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" #多终端认证配置