From 40529f7d2cadd71c72cb89c7f79046a8ff689df5 Mon Sep 17 00:00:00 2001 From: huanghongfa <18228131219@163.com> Date: 星期四, 24 十二月 2020 17:45:10 +0800 Subject: [PATCH] 系统管理 --- springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/RoleApi.java | 82 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 82 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..00bec7f --- /dev/null +++ b/springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/RoleApi.java @@ -0,0 +1,82 @@ +package com.panzhihua.service_user.api; + +import com.panzhihua.common.model.vos.MenuVO; +import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.user.RoleVO; +import com.panzhihua.service_user.service.RoleService; +import org.springframework.web.bind.annotation.*; + +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); + } + + /** + * 角色下拉列表 + * @param communityId 对应社区 0 表示运营后台 + * @return 角色集合 + */ + @PostMapping("listrolebackstage") + public R listRoleBackstage(@RequestParam("communityId") Long communityId){ + return roleService.listRoleBackstage(communityId); + } + + /** + * 新增角色 + * @param roleVO 角色信息 + * @return 新增结果 + */ + @PostMapping("addrolebackstage") + public R addRoleBackstage(@RequestBody RoleVO roleVO){ + return roleService.addRoleBackstage(roleVO); + } + + /** + * 删除角色 + * @param roleVO 角色主键 + * @return 删除结果 + */ + @PostMapping("deleterolebackstage") + public R deleteRoleBackstage(@RequestBody RoleVO roleVO){ + return roleService.deleteRoleBackstage(roleVO); + } +} -- Gitblit v1.7.1