From def38240262b4403377d4c16beac3ea048f1e658 Mon Sep 17 00:00:00 2001
From: huanghongfa <18228131219@163.com>
Date: 星期日, 20 十二月 2020 13:25:39 +0800
Subject: [PATCH] 修改目录结构

---
 springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/RoleApi.java |   54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/RoleApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/RoleApi.java
new file mode 100644
index 0000000..10e26e2
--- /dev/null
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/RoleApi.java
@@ -0,0 +1,54 @@
+package com.panzhihua.service_user.api;
+
+import com.panzhihua.common.model.vos.MenuVO;
+import com.panzhihua.common.model.vos.R;
+import com.panzhihua.service_user.service.RoleService;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @program: springcloud_k8s_panzhihuazhihuishequ
+ * @description: 权限
+ * @author: huang.hongfa weixin hhf9596 qq 959656820
+ * @create: 2020-11-25 15:57
+ **/
+@RestController
+@RequestMapping("/role/")
+public class RoleApi {
+    @Resource
+    private RoleService roleService;
+
+    /**
+     * 获取平台所有权限url
+     * @return 所有权限url
+     */
+    @PostMapping("getAllMenu")
+    public R<List<MenuVO>> getAllMenu(){
+        return roleService.getAllMenu();
+    }
+
+    /**
+     * 获取某个人的所有角色
+     * @param username 用户ID
+     * @return 所有角色
+     */
+    @PostMapping("getUserRoles")
+    public R<List<String>> getUserRoles(@RequestParam("username") String username){
+        return roleService.getUserRoles(username);
+    }
+
+    /**
+     * 查询社区的党委角色
+     * @param communityId 社区id
+     * @return 党委角色列表
+     */
+    @PostMapping("listidentity")
+    public R listIdentity(@RequestParam("communityId")Integer communityId){
+        return roleService.listIdentity(communityId);
+    }
+}

--
Gitblit v1.7.1