Browse Source

删除不需要的角色接口
修改新建tablestore表的版本参数为1,不然无法建立索引

tanzhongran 3 years ago
parent
commit
4be271c968

+ 1 - 1
abi-cloud-qr-platform-common/src/main/java/com/abi/task/common/utils/TableStoreUtils.java

@@ -79,7 +79,7 @@ public class TableStoreUtils {
         //数据的过期时间,单位为秒,-1表示永不过期。带索引表的数据表数据生命周期必须设置为-1。
         int timeToLive = -1;
         //保存的最大版本数,1表示每列上最多保存一个版本即保存最新的版本。带索引表的数据表最大版本数必须设置为1。
-        int maxVersions = 3;
+        int maxVersions = 1;
         TableOptions tableOptions = new TableOptions(timeToLive, maxVersions);
         CreateTableRequest request = new CreateTableRequest(tableMeta, tableOptions);
         //设置预留读写吞吐量,容量型实例中的数据表只能设置为0,高性能实例中的数据表可以设置为非零值。

+ 0 - 9
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/controller/console/RoleManagerController.java

@@ -27,15 +27,6 @@ public class RoleManagerController {
     @Autowired
     private RoleManagerService roleManagerService;
 
-    @ApiOperation("查询当前用户能看到的角色列表")
-    @GetMapping("listResource")
-    public BaseResponse<ListRoleForSelectRes> listRoleForSelect() throws Exception{
-        //查询当前用户能看到的资源
-        ListRoleForSelectRes result = roleManagerService.listResource();
-        //包装出参
-        return BaseResponse.create(result);
-    }
-
     @ApiOperation("获取选择的上级角色对应的菜单/操作权限树")
     @GetMapping("listResourceTreeBySelectRoleCode")
     public BaseResponse<ListResourceTreeBySelectRoleCodeRes> listResourceTreeBySelectRoleCode(@Validated ListResourceTreeBySelectRoleCodeReq listResourceTreeBySelectRoleCodeReq) throws Exception{

+ 0 - 24
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/dto/res/ListRoleForSelectRes.java

@@ -1,24 +0,0 @@
-package com.abi.qms.platform.dto.res;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-import lombok.ToString;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * @author:Andy.Tan
- * @Description: 查询当前用户能看到的资源出参
- */
-@Data
-@ApiModel
-public class ListRoleForSelectRes implements Serializable {
-
-  @ApiModelProperty("用户名下的角色code列表")
-  private List<String> roleCodeList;
-
-}

+ 0 - 7
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/RoleManagerService.java

@@ -45,13 +45,6 @@ public interface RoleManagerService {
      */
     ListRoleRes listRole(ListRoleReq listRoleReq) throws Exception;
 
-    /**
-     * 查询当前用户能看到的角色列表
-     * @return
-     * @throws Exception
-     */
-    ListRoleForSelectRes listResource() throws Exception;
-
     /**
      * 角色code查询角色信息
      *

+ 0 - 19
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/RoleManagerServiceImpl.java

@@ -205,25 +205,6 @@ public class RoleManagerServiceImpl implements RoleManagerService {
         return res;
     }
 
-    /**
-     * 查询当前用户能看到的角色列表
-     **/
-    @Override
-    public ListRoleForSelectRes listResource() {
-        //获取当前登录的用户
-        UserInfo user = userUtil.getUser();
-        //获取当前用户的角色
-        UserRole role = getRoleByCode(user.getRoleCode());
-
-        //1-查询角色下所有角色列表
-        List<String> roleCodeList = userResourceService.listResourceByRoleCode(role.getRoleCode());
-
-        ListRoleForSelectRes res = new ListRoleForSelectRes();
-        res.setRoleCodeList(roleCodeList);
-
-        return res;
-    }
-
     /**
      * 角色code查询角色信息
      * @param roleCode