Browse Source

去掉负载均衡服务

master
wxz 5 years ago
parent
commit
70b2b8a35d
  1. 27
      gov-access-lb/gov-access-lb-client/pom.xml
  2. 61
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovLanguageDTO.java
  3. 124
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovMenuDTO.java
  4. 102
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovResourceDTO.java
  5. 93
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovRoleDTO.java
  6. 82
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovRoleMenuDTO.java
  7. 82
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovRoleUserDTO.java
  8. 86
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/OperationScopeDTO.java
  9. 82
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/RoleOperationDTO.java
  10. 86
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/RoleScopeDTO.java
  11. 17
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigAdd4RoletFormDTO.java
  12. 26
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOpeDefaultScopesFormDTO.java
  13. 16
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOpesFormDTO.java
  14. 16
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOptionsFormDTO.java
  15. 18
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigRoleDefaultOpesFormDTO.java
  16. 18
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigSaveConfigDTO.java
  17. 12
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessSettingFormDTO.java
  18. 29
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/GetSQLFilterFormDTO.java
  19. 22
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/HasSpecifiedPermissionFormDTO.java
  20. 20
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/InitDefaultOperationsFormDTO.java
  21. 18
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/ListOpePermsFormDTO.java
  22. 18
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/OperationScopeFormDTO.java
  23. 59
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/StaffPermCacheFormDTO.java
  24. 16
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOpeDefaultScopesResultDTO.java
  25. 13
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOpesResultDTO.java
  26. 10
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOptionsResultDTO.java
  27. 15
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigScopeResultDTO.java
  28. 58
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessSettingResultDTO.java
  29. 59
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/LoginUserDetailsResultDTO.java
  30. 29
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/MenuResourceDTO.java
  31. 20
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/OperationScopeDefaultResultDTO.java
  32. 36
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOpeScopeResultDTO.java
  33. 60
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOperationDefaultResultDTO.java
  34. 87
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOperationResultDTO.java
  35. 36
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/MenuFlagEnum.java
  36. 36
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/MenuTypeEnum.java
  37. 29
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/RegionLeafEnum.java
  38. 30
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/RegionLevelEnum.java
  39. 30
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/UserStatusEnum.java
  40. 35
      gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java
  41. 11
      gov-access-lb/gov-access-lb-server/Dockerfile
  42. 18
      gov-access-lb/gov-access-lb-server/deploy/docker-compose-dev.yml
  43. 18
      gov-access-lb/gov-access-lb-server/deploy/docker-compose-prod.yml
  44. 18
      gov-access-lb/gov-access-lb-server/deploy/docker-compose-test.yml
  45. 137
      gov-access-lb/gov-access-lb-server/pom.xml
  46. 20
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/GovAccessLbApplication.java
  47. 40
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/aspect/RequestLogAspect.java
  48. 15
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/bean/OpeScopeFilterResultBean.java
  49. 15
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/DatabaseProperties.java
  50. 29
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/DbMigrationConfig.java
  51. 26
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/ModuleConfigImpl.java
  52. 69
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/PermissionInitializer.java
  53. 53
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/constant/OperationScopeConstant.java
  54. 138
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/AccessConfigController.java
  55. 60
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/AccessController.java
  56. 64
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/DemoController.java
  57. 85
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovLanguageController.java
  58. 156
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovMenuController.java
  59. 84
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovResourceController.java
  60. 104
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleController.java
  61. 85
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleMenuController.java
  62. 132
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleUserController.java
  63. 21
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/LbController.java
  64. 41
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/RoleController.java
  65. 25
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/TestController.java
  66. 28
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovLanguageDao.java
  67. 52
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovMenuDao.java
  68. 48
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovResourceDao.java
  69. 24
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleDao.java
  70. 49
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleMenuDao.java
  71. 57
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleUserDao.java
  72. 38
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationDao.java
  73. 57
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationScopeDao.java
  74. 64
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationScopeDefaultDao.java
  75. 47
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleOperationDao.java
  76. 57
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleOperationDefaultDao.java
  77. 85
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleScopeDao.java
  78. 49
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovLanguageEntity.java
  79. 69
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovMenuEntity.java
  80. 53
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovResourceEntity.java
  81. 44
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleEntity.java
  82. 36
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleMenuEntity.java
  83. 37
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleUserEntity.java
  84. 56
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationEntity.java
  85. 53
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationScopeDefaultEntity.java
  86. 55
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationScopeEntity.java
  87. 42
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleOperationDefaultEntity.java
  88. 51
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleOperationEntity.java
  89. 56
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleScopeEntity.java
  90. 62
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/excel/RoleOperationExcel.java
  91. 77
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java
  92. 34
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java
  93. 49
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java
  94. 31
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java
  95. 47
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovLanguageRedis.java
  96. 74
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovMenuRedis.java
  97. 50
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovResourceRedis.java
  98. 47
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleMenuRedis.java
  99. 47
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleRedis.java
  100. 47
      gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleUserRedis.java

27
gov-access-lb/gov-access-lb-client/pom.xml

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>gov-access-lb</artifactId>
<groupId>com.epmet</groupId>
<version>2.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gov-access-lb-client</artifactId>
<dependencies>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-tools</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.5.20</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>

61
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovLanguageDTO.java

@ -1,61 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
/**
* 国际化
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@Data
public class GovLanguageDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 表名
*/
private String tableName;
/**
* 表主键
*/
private String tableId;
/**
* 字段名
*/
private String fieldName;
/**
* 字段值
*/
private String fieldValue;
/**
* 语言
*/
private String language;
}

124
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovMenuDTO.java

@ -1,124 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import com.epmet.commons.tools.utils.TreeStringNode;
import com.epmet.dto.result.MenuResourceDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 菜单管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@Data
public class GovMenuDTO extends TreeStringNode<GovMenuDTO> implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private String id;
/**
* 上级ID一级菜单为0
*/
private String pid;
/**
* 菜单名称
*/
private String name;
/**
* 菜单URL
*/
private String url;
/**
* 类型 0菜单 1按钮
*/
private Integer type;
/**
* 菜单图标
*/
private String icon;
/**
* 权限标识sys:menu:save
*/
private String permissions;
/**
* 排序
*/
private Integer sort;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 菜单资源
*/
private List<MenuResourceDTO> resourceList;
/**
* 上级菜单名称
*/
private String parentName;
/**
* 是否显示1显示 0不显示
*/
private Integer showFlag;
}

102
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovResourceDTO.java

@ -1,102 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 资源管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@Data
public class GovResourceDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private String id;
/**
* 资源编码如菜单ID
*/
private String resourceCode;
/**
* 资源名称
*/
private String resourceName;
/**
* 资源URL
*/
private String resourceUrl;
/**
* 请求方式GETPOSTPUTDELETE
*/
private String resourceMethod;
/**
* 菜单标识 0非菜单资源 1菜单资源
*/
private Integer menuFlag;
/**
* 认证等级 0权限认证 1登录认证 2无需认证
*/
private Integer authLevel;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

93
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovRoleDTO.java

@ -1,93 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 角色管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@Data
public class GovRoleDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private String id;
/**
* 角色名称
*/
private String name;
/**
* 备注
*/
private String remark;
/**
* 部门ID
*/
private Long deptId;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 菜单ID列表
*/
private List<String> menuIdList;
}

82
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovRoleMenuDTO.java

@ -1,82 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 角色菜单关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@Data
public class GovRoleMenuDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private String id;
/**
* 角色ID
*/
private String roleId;
/**
* 菜单ID
*/
private String menuId;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

82
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovRoleUserDTO.java

@ -1,82 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 角色用户关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@Data
public class GovRoleUserDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private String id;
/**
* 角色ID
*/
private String roleId;
/**
* 用户ID
*/
private String userId;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

86
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/OperationScopeDTO.java

@ -1,86 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 权限范围表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-24
*/
@Data
public class OperationScopeDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* id
*/
private String id;
/**
* 范围key
*/
private String scopeKey;
/**
* 范围名称
*/
private String scopeName;
/**
* 范围序号
*/
private String scopeIndex;
/**
* 是否删除0未删除1已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建者id
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新者id
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

82
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/RoleOperationDTO.java

@ -1,82 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 角色能进行那些操作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-22
*/
@Data
public class RoleOperationDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 角色ID
*/
private String roleId;
/**
* 操作key
*/
private String operationKey;
/**
* 是否删除0未删除1已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建者id
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新者id
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

86
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/RoleScopeDTO.java

@ -1,86 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 角色能操作哪些范围
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-24
*/
@Data
public class RoleScopeDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 角色ID
*/
private String roleId;
/**
* 操作key
*/
private String operationKey;
/**
* 范围Key
*/
private String scopeKey;
/**
* 是否删除0未删除1已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建者id
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新者id
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

17
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigAdd4RoletFormDTO.java

@ -1,17 +0,0 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.List;
@Data
public class AccessConfigAdd4RoletFormDTO {
@NotBlank(message = "角色Key不能为空")
private String roleKey;
@NotBlank(message = "操作Key不能为空")
private String operationKey;
private List<String> scopeKeys;
}

26
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOpeDefaultScopesFormDTO.java

@ -1,26 +0,0 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* 权限配置-操作默认范围form dto
*/
@Data
public class AccessConfigOpeDefaultScopesFormDTO {
public interface ListOpeDefaultScopesGroup {}
public interface SaveOpeDefaultScopesGroup {}
@NotBlank(message = "角色Key不能为空", groups = { ListOpeDefaultScopesGroup.class, SaveOpeDefaultScopesGroup.class })
private String roleKey;
@NotBlank(message = "操作Key不能为空", groups = { ListOpeDefaultScopesGroup.class, SaveOpeDefaultScopesGroup.class })
private String operationKey;
private List<String> scopeKeys;
}

16
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOpesFormDTO.java

@ -1,16 +0,0 @@
package com.epmet.dto.form;
import com.epmet.dto.result.AccessConfigOpesResultDTO;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.List;
@Data
public class AccessConfigOpesFormDTO {
@NotBlank(message = "角色ID不能为空")
private String roleId;
private List<AccessConfigOpesResultDTO> opes;
}

16
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOptionsFormDTO.java

@ -1,16 +0,0 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
public class AccessConfigOptionsFormDTO {
@NotBlank(message = "角色ID不能为空")
private String roleId;
@NotBlank(message = "操作的Key不能为空")
private String operationKey;
}

18
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigRoleDefaultOpesFormDTO.java

@ -1,18 +0,0 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.List;
/**
* 角色默认操作权限列表from DTO
*/
@Data
public class AccessConfigRoleDefaultOpesFormDTO {
@NotBlank(message = "角色Key不能为空")
private String roleKey;
private List<String> operationKeys;
}

18
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigSaveConfigDTO.java

@ -1,18 +0,0 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Set;
@Data
public class AccessConfigSaveConfigDTO {
@NotBlank(message = "角色ID不能为空")
private String roleId;
@NotBlank(message = "操作Key不能为空")
private String operationKey;
private Set<String> scopeKeys;
private Set<String> settingKeys;
}

12
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessSettingFormDTO.java

@ -1,12 +0,0 @@
package com.epmet.dto.form;
import lombok.Data;
/**
* 查询拥有的权限的DTO非后台配置用
*/
@Data
public class AccessSettingFormDTO {
private String roleId;
private String operationKey;
}

29
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/GetSQLFilterFormDTO.java

@ -1,29 +0,0 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Set;
@Data
public class GetSQLFilterFormDTO {
@NotBlank
private String operationKey;
@NotBlank
private String userId;
@NotBlank
private String app;
@NotBlank
private String client;
private String tableAlias;
private Set<String> gridIds;
private Set<String> departmentIds;
}

22
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/HasSpecifiedPermissionFormDTO.java

@ -1,22 +0,0 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
public class HasSpecifiedPermissionFormDTO {
@NotBlank
private String operationKey;
@NotBlank
private String userId;
@NotBlank
private String app;
@NotBlank
private String client;
}

20
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/InitDefaultOperationsFormDTO.java

@ -1,20 +0,0 @@
package com.epmet.dto.form;
import lombok.Data;
import java.util.List;
@Data
public class InitDefaultOperationsFormDTO {
private List<InitDefaultOpesRoleDTO> roles;
@Data
public static class InitDefaultOpesRoleDTO {
public InitDefaultOpesRoleDTO() {
}
private String roleId;
private String roleKey;
}
}

18
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/ListOpePermsFormDTO.java

@ -1,18 +0,0 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
public class ListOpePermsFormDTO {
@NotBlank(message = "用户ID不能为空")
private String staffId;
@NotBlank(message = "当前单位不能为空")
private String currAgencyId;
private String currGridId;
private String currDeptId;
}

18
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/OperationScopeFormDTO.java

@ -1,18 +0,0 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@Data
public class OperationScopeFormDTO {
public interface ListOperationScopeGroup {}
@NotBlank(message = "角色ID不能为空", groups = {ListOperationScopeGroup.class})
private String roleId;
@NotBlank(message = "操作的key不能为空", groups = {ListOperationScopeGroup.class})
private String operationKey;
}

59
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/StaffPermCacheFormDTO.java

@ -1,59 +0,0 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.util.Set;
@Data
public class StaffPermCacheFormDTO {
/**
* 更新权限缓存分组
*/
public interface UpdatePermissionCache {}
/**
* 查询当前权限列表
*/
public interface GetStaffCurrPermissions {}
/**
* 工作人员 id
*/
@NotBlank(message = "工作人员ID不能为空", groups = {UpdatePermissionCache.class, GetStaffCurrPermissions.class})
private String staffId;
/**
* 登录头信息app
*/
@NotBlank(message = "登录头信息app不能为空", groups = {UpdatePermissionCache.class, GetStaffCurrPermissions.class})
private String app;
/**
* 登录头信息client
*/
@NotBlank(message = "登录头信息client不能为空", groups = {UpdatePermissionCache.class, GetStaffCurrPermissions.class})
private String client;
/**
* 组织ID路径
*/
private String orgIdPath;
/**
* 权限列表
*/
private Set<String> permissions;
/**
* 角色列表
*/
private Set<String> roleIdList;
/**
* 当前所在网格id
*/
private String gridId;
}

16
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOpeDefaultScopesResultDTO.java

@ -1,16 +0,0 @@
package com.epmet.dto.result;
import lombok.Data;
/**
* 权限配置-操作的默认范围result dto
*/
@Data
public class AccessConfigOpeDefaultScopesResultDTO {
private String scopeKey;
private String scopeName;
private String scopeIndex;
private String operationKey;
private String roleKey;
private Boolean assigned;
}

13
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOpesResultDTO.java

@ -1,13 +0,0 @@
package com.epmet.dto.result;
import lombok.Data;
@Data
public class AccessConfigOpesResultDTO {
private String operationKey;
private String operationName;
private String brief;
private Boolean assigned;
}

10
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOptionsResultDTO.java

@ -1,10 +0,0 @@
package com.epmet.dto.result;
import lombok.Data;
import java.util.List;
@Data
public class AccessConfigOptionsResultDTO {
private List<AccessConfigScopeResultDTO> scopeOptions;
}

15
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigScopeResultDTO.java

@ -1,15 +0,0 @@
package com.epmet.dto.result;
import lombok.Data;
@Data
public class AccessConfigScopeResultDTO {
private String scopeKey;
private String scopeName;
private String scopeIndex;
private String operationKey;
private String roleId;
private Boolean assigned;
}

58
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessSettingResultDTO.java

@ -1,58 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.result;
import lombok.Data;
/**
* 权限配置
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-29
*/
@Data
public class AccessSettingResultDTO {
private static final long serialVersionUID = 1L;
/**
* 角色ID
*/
private String roleId;
/**
* 操作key
*/
private String operationKey;
/**
* 配置KEY
*/
private String settingKey;
/**
* 配置值
*/
private String settingValue;
/**
* 配置名称
*/
private String settingName;
}

59
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/LoginUserDetailsResultDTO.java

@ -1,59 +0,0 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.security.dto.GovTokenDto;
import lombok.Data;
import java.util.List;
import java.util.Set;
@Data
public class LoginUserDetailsResultDTO {
/**
* 政府端:gov居民端:resi运营端:oper
*/
private String app;
/**
* PC端:web微信小程序:wxmp
*/
private String client;
/**
* 用户ID
*/
private String userId;
/**
* 角色列表
*/
//private Set<String> roleIdList;
private List<GovTokenDto.Role> roleList;
/**
* 部门id列表
*/
private Set<String> deptIdList;
/**
* 当前登录的组织id(顶级)
*/
private String agencyId;
/**
* 组织ID
*/
private String orgIdPath;
/**
* 网格ID列表
*/
private Set<String> gridIdList;
/**
* 当前工作人员进入的客户id
*/
private String customerId;
}

29
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/MenuResourceDTO.java

@ -1,29 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dto.result;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 菜单资源
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@ApiModel(value = "菜单资源")
public class MenuResourceDTO {
@ApiModelProperty(value = "资源URL")
private String resourceUrl;
@ApiModelProperty(value = "请求方式(如:GET、POST、PUT、DELETE)")
private String resourceMethod;
}

20
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/OperationScopeDefaultResultDTO.java

@ -1,20 +0,0 @@
package com.epmet.dto.result;
import lombok.Data;
@Data
public class OperationScopeDefaultResultDTO {
private String roleKey;
/**
* 操作key
*/
private String operationKey;
/**
* 范围key
*/
private String scopeKey;
}

36
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOpeScopeResultDTO.java

@ -1,36 +0,0 @@
package com.epmet.dto.result;
import lombok.Data;
@Data
public class RoleOpeScopeResultDTO {
/**
* 角色ID
*/
private String roleId;
/**
* 操作key
*/
private String operationKey;
/**
* 范围key
*/
private String scopeKey;
/**
* 范围名称
*/
private String scopeName;
/**
* 范围序号
*/
private String scopeIndex;
private String series;
private Integer sort;
}

60
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOperationDefaultResultDTO.java

@ -1,60 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.result;
import java.io.Serializable;
import lombok.Data;
/**
* 角色默认的可操作功能列表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-05-21
*/
@Data
public class RoleOperationDefaultResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 角色KEY
*/
private String roleKey;
/**
* 操作key
*/
private String operationKey;
/**
* 操作名称
*/
private String operationName;
/**
* 是否已经具有该操作权限
*/
private Boolean assigned;
}

87
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOperationResultDTO.java

@ -1,87 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto.result;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 角色能进行那些操作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-22
*/
@Data
public class RoleOperationResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
private String id;
/**
* 角色ID
*/
private String roleId;
/**
* 操作key
*/
private String operationKey;
/**
* 操作名称
*/
private String operationName;
/**
* 是否删除0未删除1已删除
*/
private String delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建者id
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新者id
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

36
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/MenuFlagEnum.java

@ -1,36 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.enums;
/**
* 菜单资源标识
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
public enum MenuFlagEnum {
/**
* 菜单资源
*/
YES(1),
/**
* 非菜单资源
*/
NO(0);
private int value;
MenuFlagEnum(int value) {
this.value = value;
}
public int value() {
return this.value;
}
}

36
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/MenuTypeEnum.java

@ -1,36 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.enums;
/**
* 菜单类型枚举
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
public enum MenuTypeEnum {
/**
* 菜单
*/
MENU(0),
/**
* 按钮
*/
BUTTON(1);
private int value;
MenuTypeEnum(int value) {
this.value = value;
}
public int value() {
return this.value;
}
}

29
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/RegionLeafEnum.java

@ -1,29 +0,0 @@
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.enums;
/**
* 叶子节点枚举
*
* @author Mark sunlightcs@gmail.com
*/
public enum RegionLeafEnum {
YES(1),
NO(0);
private int value;
RegionLeafEnum(int value) {
this.value = value;
}
public int value() {
return this.value;
}
}

30
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/RegionLevelEnum.java

@ -1,30 +0,0 @@
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.enums;
/**
* 行政区域 级别枚举
*
* @author Mark sunlightcs@gmail.com
*/
public enum RegionLevelEnum {
ONE(1),
TWO(2),
THREE(3);
private int value;
RegionLevelEnum(int value) {
this.value = value;
}
public int value() {
return this.value;
}
}

30
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/UserStatusEnum.java

@ -1,30 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.enums;
/**
* 用户状态
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
public enum UserStatusEnum {
DISABLE(0),
ENABLED(1);
private int value;
UserStatusEnum(int value) {
this.value = value;
}
public int value() {
return this.value;
}
}

35
gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java

@ -1,35 +0,0 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.InitDefaultOperationsFormDTO;
import com.epmet.dto.form.ListOpePermsFormDTO;
import com.epmet.feign.fallback.GovAccessFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.Set;
//@FeignClient(name = ServiceConstant.GOV_ACCESS_SERVER, fallback = GovAccessFeignClientFallBack.class, url = "http://localhost:8099")
@FeignClient(name = "lb-server", fallback = GovAccessFeignClientFallBack.class)
public interface GovAccessFeignClient {
/**
* 批量为角色ID初始化操作权限列表
* @param formDTO
* @return
*/
@PostMapping("/gov/access/role/initdefaultoperationsforroles")
Result initDefaultOperationsForRoles(@RequestBody InitDefaultOperationsFormDTO formDTO);
/**
* 列出觉得的功能权限列表
* @return
*/
@PostMapping("/gov/access/access/listoperationpermissions")
Result<Set<String>> listOperationPermissions(@RequestBody ListOpePermsFormDTO listOpePermsFormDTO);
@PostMapping("/lb/get-host")
Result getHost();
}

11
gov-access-lb/gov-access-lb-server/Dockerfile

@ -1,11 +0,0 @@
FROM java:8
RUN export LANG="zh_CN.UTF-8"
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone
COPY ./target/*.jar ./gov-access-lb.jar
EXPOSE 9999
ENTRYPOINT ["sh", "-c", "$RUN_INSTRUCT"]

18
gov-access-lb/gov-access-lb-server/deploy/docker-compose-dev.yml

@ -1,18 +0,0 @@
version: "3.7"
services:
gov-access-lb-server:
container_name: gov-access-lb-server-dev
image: 192.168.1.130:10080/epmet-cloud-dev/gov-access-lb-server:version_placeholder
ports:
- "9999:9999"
network_mode: host # 使用现有网络
volumes:
- "/opt/epmet-cloud-logs/dev:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx200m -jar ./gov-access-lb.jar"
restart: "unless-stopped"
deploy:
resources:
limits:
cpus: '0.1'
memory: 250M

18
gov-access-lb/gov-access-lb-server/deploy/docker-compose-prod.yml

@ -1,18 +0,0 @@
version: "3.7"
services:
gov-access-server:
container_name: gov-access-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/gov-access-server:0.3.39
ports:
- "8099:8099"
network_mode: host # 使用现有网络
volumes:
- "/opt/epmet-cloud-logs/prod:/logs"
environment:
RUN_INSTRUCT: "java -Xms256m -Xmx512m -jar ./gov-access.jar"
restart: "unless-stopped"
deploy:
resources:
limits:
cpus: '0.1'
memory: 600M

18
gov-access-lb/gov-access-lb-server/deploy/docker-compose-test.yml

@ -1,18 +0,0 @@
version: "3.7"
services:
gov-access-server:
container_name: gov-access-server-test
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-release/gov-access-server:version_placeholder
ports:
- "8099:8099"
network_mode: host # 使用现有网络
volumes:
- "/opt/epmet-cloud-logs/test:/logs"
environment:
RUN_INSTRUCT: "java -Xms32m -Xmx300m -jar ./gov-access.jar"
restart: "unless-stopped"
deploy:
resources:
limits:
cpus: '0.1'
memory: 400M

137
gov-access-lb/gov-access-lb-server/pom.xml

@ -1,137 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.41</version>
<parent>
<artifactId>gov-access-lb</artifactId>
<groupId>com.epmet</groupId>
<version>2.0.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>gov-access-lb-server</artifactId>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>gov-access-client</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>gov-org-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-user-client</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-tools</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.epmet</groupId>
<artifactId>epmet-commons-mybatis</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
<version>${spring.boot.admin.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- 替换Feign原生httpclient -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-httpclient</artifactId>
<version>10.3.0</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<resources>
<resource>
<filtering>true</filtering>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<server.port>9999</server.port>
<spring.profiles.active>dev</spring.profiles.active>
<!-- 数据库配置-->
<spring.datasource.druid.url>
<![CDATA[jdbc:mysql://192.168.1.130:3306/epmet_gov_access?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai]]>
</spring.datasource.druid.url>
<spring.datasource.druid.username>epmet_gov_access_user</spring.datasource.druid.username>
<spring.datasource.druid.password>EpmEt-db-UsEr</spring.datasource.druid.password>
<!-- redis配置 -->
<spring.redis.index>0</spring.redis.index>
<spring.redis.host>192.168.1.130</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>123456</spring.redis.password>
<!-- nacos -->
<nacos.register-enabled>true</nacos.register-enabled>
<nacos.server-addr>192.168.1.130:8848</nacos.server-addr>
<nacos.discovery.namespace>6ceab336-d004-4acf-89c6-e121d06f4988</nacos.discovery.namespace>
<nacos.config.namespace></nacos.config.namespace>
<nacos.config.group></nacos.config.group>
<nacos.config-enabled>false</nacos.config-enabled>
<nacos.ip/>
<!--flyway migration 数据库迁移工具-->
<spring.flyway.enabled>false</spring.flyway.enabled>
</properties>
</profile>
</profiles>
</project>

20
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/GovAccessLbApplication.java

@ -1,20 +0,0 @@
package com.epmet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
//@EnableConfigurationProperties(value = {DatabaseProperties.class})
public class GovAccessLbApplication {
public static void main(String[] args) {
SpringApplication.run(GovAccessLbApplication.class, args);
}
}

40
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/aspect/RequestLogAspect.java

@ -1,40 +0,0 @@
package com.epmet.aspect;
import com.epmet.commons.tools.aspect.BaseRequestLogAspect;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
* 日志/异常处理切面实现调用父类方法完成日志记录和异常处理
*/
@Aspect
@Component
@Order(0)
public class RequestLogAspect extends BaseRequestLogAspect {
@Override
@Around(value = "execution(* com.epmet.controller.*Controller*.*(..)) ")
public Object proceed(ProceedingJoinPoint point) throws Throwable {
return super.proceed(point, getRequest());
}
/**
* 获取Request对象
*
* @return
*/
private HttpServletRequest getRequest() {
RequestAttributes ra = RequestContextHolder.getRequestAttributes();
ServletRequestAttributes sra = (ServletRequestAttributes) ra;
return sra.getRequest();
}
}

15
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/bean/OpeScopeFilterResultBean.java

@ -1,15 +0,0 @@
package com.epmet.bean;
import lombok.Data;
import java.util.HashSet;
import java.util.Set;
@Data
public class OpeScopeFilterResultBean {
private HashSet<String> orgLevelScopes;
private Set<String> switchScopes;
private boolean allScopes;
}

15
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/DatabaseProperties.java

@ -1,15 +0,0 @@
//package com.epmet.config;
//
//import lombok.Data;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//
//@ConfigurationProperties(prefix = "spring.datasource.druid")
//@Data
//public class DatabaseProperties {
//
// private String driverClassName;
// private String url;
// private String username;
// private String password;
//
//}

29
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/DbMigrationConfig.java

@ -1,29 +0,0 @@
//package com.epmet.config;
//
//import org.flywaydb.core.Flyway;
//import org.springframework.beans.factory.annotation.Autowired;
//
//import javax.annotation.PostConstruct;
//
///**
// * 数据库迁移配置
// */
//@Configuration
//public class DbMigrationConfig {
//
// @Autowired
// private DatabaseProperties databaseProperties;
//
// @PostConstruct
// public void migrate() {
// Flyway flyway = Flyway.configure().dataSource(
// databaseProperties.getUrl(),
// databaseProperties.getUsername(),
// databaseProperties.getPassword())
// .baselineOnMigrate(true)
// .load();
//
// flyway.migrate();
// }
//
//}

26
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/ModuleConfigImpl.java

@ -1,26 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* <p>
* https://www.renren.io
* <p>
* 版权所有侵权必究
*/
package com.epmet.config;
import com.epmet.commons.tools.config.ModuleConfig;
import org.springframework.stereotype.Service;
/**
* 模块配置信息-新闻公告模块
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Service
public class ModuleConfigImpl implements ModuleConfig {
@Override
public String getName() {
return "govaccess";
}
}

69
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/PermissionInitializer.java

@ -1,69 +0,0 @@
package com.epmet.config;
import com.epmet.commons.tools.enums.RequirePermissionEnum;
import com.epmet.entity.OperationEntity;
import com.epmet.service.OperationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.util.CollectionUtils;
import javax.annotation.PostConstruct;
import java.util.*;
@Configuration
public class PermissionInitializer {
@Autowired
private OperationService operationService;
/**
* 初始化操作权限
*/
@PostConstruct
public void initOpePermissions() {
final Map<String, OperationEntity> existsOpesMap = new HashMap<>();
List<OperationEntity> allExistsOpeEntities = operationService.listAllOperations();
allExistsOpeEntities.stream().forEach(ope -> existsOpesMap.put(ope.getOperationKey(), ope));
ArrayList<OperationEntity> operations2Create = new ArrayList<>();
ArrayList<OperationEntity> operations2Update = new ArrayList<>();
// 1.收集需要添加的
List<RequirePermissionEnum> permEnums = Arrays.asList(RequirePermissionEnum.values());
for (RequirePermissionEnum perm : permEnums) {
String key = perm.getKey();
if (!existsOpesMap.containsKey(key)) {
OperationEntity operationEntity = new OperationEntity();
operationEntity.setOperationKey(key);
operationEntity.setBrief(perm.getBrief());
operationEntity.setOperationName(perm.getName());
operations2Create.add(operationEntity);
}
}
//2.收集需要修改的
for (RequirePermissionEnum perm : permEnums) {
String key = perm.getKey();
String name = perm.getName();
String brief = perm.getBrief();
if (existsOpesMap.containsKey(key)) {
OperationEntity ope = existsOpesMap.get(key);
if (!name.equals(ope.getOperationName()) || !brief.equals(ope.getBrief())) {
// name或者brief发生过变化的,需要更新
ope.setBrief(brief);
ope.setOperationName(name);
operations2Update.add(ope);
}
}
}
//3.批量添加和修改
if (!CollectionUtils.isEmpty(operations2Create)) {
operationService.createBatch(operations2Create);
}
if (!CollectionUtils.isEmpty(operations2Update)) {
operationService.updateBatch(operations2Update);
}
}
}

53
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/constant/OperationScopeConstant.java

@ -1,53 +0,0 @@
package com.epmet.constant;
/**
* 操作范围系列常量
*/
public class OperationScopeConstant {
/**
* ===================系列===================
*/
public static final String SERIES_ORG_LEVEL = "org_level";
public static final String SERIES_SWITCH = "switch";
public static final String SERIES_ALL = "all";
/**
* ===================范围===================
*/
// 无任何范围限制
public static final String SCOPE_ALL = "all";
// 覆盖机构下的所有范围
public static final String SCOPE_ORG_ALL = "org_all";
//"同级组织的下级"
public static final String SCOPE_ORG_EQUAL_SUB = "org_equal_sub";
//"同级组织及下级"
public static final String SCOPE_ORG_EQUAL_AND_SUB = "org_equal_and_sub";
// 同级组织的上级
public static final String SCOPE_ORG_EQUAL_SUP = "org_equal_sup";
// 同级组织及上级
public static final String SCOPE_ORG_EQUAL_AND_SUP = "org_equal_and_sup";
//"同级组织"
public static final String SCOPE_ORG_EQUAL = "org_equal";
//"本组织的下级"
public static final String SCOPE_ORG_CURR_SUB = "org_curr_sub";
//"本组织及下级"
public static final String SCOPE_ORG_CURR_AND_SUB = "org_curr_and_sub";
//"本组织"
public static final String SCOPE_ORG_CURR = "org_curr";
//"本组织的上级"
public static final String SCOPE_ORG_CURR_SUP = "org_curr_sup";
//"本组织及上级"
public static final String SCOPE_ORG_CURR_AND_SUP = "org_curr_and_sup";
//我创建的
public static final String SCOPE_I_CREATED = "i_created";
//网格内
public static final String SCOPE_IN_GRID = "in_grid";
// 部门内
public static final String SCOPE_IN_DEPARTMENT = "in_department";
}

138
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/AccessConfigController.java

@ -1,138 +0,0 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.*;
import com.epmet.dto.result.AccessConfigOpeDefaultScopesResultDTO;
import com.epmet.dto.result.AccessConfigOpesResultDTO;
import com.epmet.dto.result.AccessConfigOptionsResultDTO;
import com.epmet.dto.result.RoleOperationDefaultResultDTO;
import com.epmet.service.AccessConfigService;
import oracle.jdbc.proxy.annotation.Post;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotBlank;
import java.util.List;
import java.util.Set;
@RestController
@RequestMapping("config")
public class AccessConfigController {
@Autowired
private AccessConfigService accessConfigService;
/**
* 根据roleKey查询角色默认操作列表(包括assigned字段标识该角色是否已经具有该操作权限)
* @param roleKey
* @return
*/
@PostMapping("roledefaultops/{roleKey}")
public Result listRoleDefaultOps(@PathVariable("roleKey") String roleKey) {
List<RoleOperationDefaultResultDTO> defaultOps = accessConfigService.listRoleDefaultOpsByRoleKey(roleKey);
return new Result().ok(defaultOps);
}
/**
* 根据角色ID列出角色的操作列表(及该操作的scope范围)
* @param roleId
* @return
*/
@PostMapping("roleopes/{roleId}")
public Result listRoleOperations(@PathVariable("roleId") String roleId) {
List<AccessConfigOpesResultDTO> opes = accessConfigService.listOpesByRole(roleId);
return new Result().ok(opes);
}
/**
* 保存角色的操作权限列表
* @return
*/
@PostMapping("saveroleopes")
public Result saveRoleOpes(@RequestBody AccessConfigOpesFormDTO formDTO) {
accessConfigService.saveRoleOpes(formDTO.getRoleId(), formDTO.getOpes());
return new Result();
}
/**
* 查询可配置项列表
* @return
*/
@PostMapping("configoptions")
public Result listConfigOptions(@RequestBody AccessConfigOptionsFormDTO accessConfigFormDTO) {
ValidatorUtils.validateEntity(accessConfigFormDTO);
AccessConfigOptionsResultDTO options = accessConfigService.listScopeOptionsForAccessConfig(accessConfigFormDTO.getRoleId(), accessConfigFormDTO.getOperationKey());
return new Result().ok(options);
}
/**
* 保存设置
* @param config
* @return
*/
@PostMapping("saveconfig")
public Result saveSettings(@RequestBody AccessConfigSaveConfigDTO config) {
ValidatorUtils.validateEntity(config);
String roleId = config.getRoleId();
String operationKey = config.getOperationKey();
Set<String> scopeKeys = config.getScopeKeys();
accessConfigService.saveConfig(roleId, operationKey, scopeKeys);
return new Result();
}
/**
* 保存角色默认操作权限列表
* @param form
* @return
*/
@PostMapping("roledefaultopes/save")
public Result saveRoleDefaultOperations(@RequestBody AccessConfigRoleDefaultOpesFormDTO form) {
ValidatorUtils.validateEntity(form);
accessConfigService.saveRoleDefaultOperations(form.getRoleKey(), form.getOperationKeys());
return new Result();
}
/**
* 查询操作的默认范围列表
* @param form
* @return
*/
@PostMapping("opedefaultscopes/list")
public Result listOpeDefaultScopes(@RequestBody AccessConfigOpeDefaultScopesFormDTO form) {
ValidatorUtils.validateEntity(form, AccessConfigOpeDefaultScopesFormDTO.ListOpeDefaultScopesGroup.class);
List<AccessConfigOpeDefaultScopesResultDTO> scopes = accessConfigService.listOpeDefaultScopes4Role(form.getRoleKey(), form.getOperationKey());
return new Result().ok(scopes);
}
/**
* 保存操作的默认范围配置
* @param form
* @return
*/
@PostMapping("opedefaultscopes/save")
public Result saveOpeDefaultScopes(@RequestBody AccessConfigOpeDefaultScopesFormDTO form) {
ValidatorUtils.validateEntity(form, AccessConfigOpeDefaultScopesFormDTO.SaveOpeDefaultScopesGroup.class);
accessConfigService.saveOpeDefaultScopes(form.getRoleKey(), form.getOperationKey(), form.getScopeKeys());
return new Result();
}
/**
* @Description 给角色添加操作权限和操作范围
* @return
* @author wxz
* @date 2020.11.17 17:41
*/
@PostMapping("add-ope-and-scopes-4role")
public Result addOpeAndScopes4Role(@RequestBody AccessConfigAdd4RoletFormDTO form) {
ValidatorUtils.validateEntity(form);
String roleKey = form.getRoleKey();
String operationKey = form.getOperationKey();
List<String> scopeKeys = form.getScopeKeys();
accessConfigService.addOpeAndScopes4Role(roleKey, operationKey, scopeKeys);
return new Result();
}
}

60
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/AccessController.java

@ -1,60 +0,0 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.*;
import com.epmet.service.AccessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Set;
/**
* 权限相关Api
* @Author wxz
* @Description
* @Date 2020/4/23 17:54
**/
@RestController
@RequestMapping("access")
public class AccessController {
@Autowired
private AccessService accessService;
/**
* 用户是否具有指定功能权限
* @return
*/
@PostMapping("hasspecifiedpermission")
public Result<Boolean> hasSpecifiedPermission(@RequestBody HasSpecifiedPermissionFormDTO form) {
ValidatorUtils.validateEntity(form);
Boolean hasPermission = accessService.hasPermission(form.getOperationKey(), form.getUserId(), form.getApp(), form.getClient());
return new Result<Boolean>().ok(hasPermission);
}
/**
* 列出功能权限列表
* @return
*/
@PostMapping("listoperationpermissions")
public Result<Set<String>> listOperationPermissions(@RequestBody ListOpePermsFormDTO listOpePermsFormDTO) {
ValidatorUtils.validateEntity(listOpePermsFormDTO);
String currAgencyId = listOpePermsFormDTO.getCurrAgencyId();
String staffId = listOpePermsFormDTO.getStaffId();
Set<String> operationPermissions = accessService.listOperationPermissions(staffId, currAgencyId);
return new Result<Set<String>>().ok(operationPermissions);
}
/**
* 查询sql过滤片段
* @param form
* @return
*/
@PostMapping("getSqlFilterSegment")
public Result getSqlFilterSegment(@RequestBody GetSQLFilterFormDTO form) {
ValidatorUtils.validateEntity(form);
String sqlFilterSegment = accessService.getSqlFilterSegment(form);
return new Result().ok(sqlFilterSegment);
}
}

64
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/DemoController.java

@ -1,64 +0,0 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.constraints.NotBlank;
@RestController
@RequestMapping("demo")
public class DemoController {
@PostMapping("adduser")
public Result addUser(@RequestBody UserFormDTO form) {
ValidatorUtils.validateEntity(form, UserFormDTO.AddUserShowGroup.class, UserFormDTO.AddUserInternalGroup.class);
System.out.println(form);
return new Result();
}
}
@Data
class UserFormDTO {
//>>>>>>>>>>>>>>>>>校验分组开始>>>>>>>>>>>>>>>>>>>>>
/**
* 添加用户操作的内部异常分组
* 出现错误会提示给前端7000错误码返回信息为服务器开小差...
*/
public interface AddUserInternalGroup {}
/**
* 添加用户操作的用户可见异常分组
* 该分组用于校验需要返回给前端错误信息提示的列需要继承CustomerClientShowGroup
* 返回错误码为8999提示信息为DTO中具体的列的校验注解message的内容
*/
public interface AddUserShowGroup extends CustomerClientShowGroup {}
// <<<<<<<<<<<<<<<<<<<校验分组结束<<<<<<<<<<<<<<<<<<<<<<<<
/**
* 该字段在查询用户和添加用户的时候都要校验所以在groups中会添加2个分组校验器会优先校验继承了CustomerClientShowGroup
* 的分组
* 1.该分组校验出错直接将信息返回客户端(多个字段有错误多个字段的错误信息
* 拼接起来逗号分隔,详见ValidatorUtils#validadtorEntity()方法)
* 2.该分组校验成功则继续往下校验内部错误若出现内部错误则返回7000,服务器开小差...
*/
@NotBlank(message = "请输入姓名信息", groups = { AddUserInternalGroup.class, AddUserShowGroup.class })
private String name;
/**
* 用户别名只在内部传输因此它所属的分组不能继承CustomerClientShowGroup
*/
@NotBlank(message = "用户别名不能为空", groups = { AddUserInternalGroup.class })
private String alias;
@NotBlank(message = "请输入地址信息", groups = { AddUserShowGroup.class })
private String address;
}

85
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovLanguageController.java

@ -1,85 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GovLanguageDTO;
import com.epmet.service.GovLanguageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 国际化
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@RestController
@RequestMapping("operlanguage")
public class GovLanguageController {
@Autowired
private GovLanguageService govLanguageService;
@GetMapping("page")
public Result<PageData<GovLanguageDTO>> page(@RequestParam Map<String, Object> params){
PageData<GovLanguageDTO> page = govLanguageService.page(params);
return new Result<PageData<GovLanguageDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GovLanguageDTO> get(@PathVariable("id") String id){
GovLanguageDTO data = govLanguageService.get(id);
return new Result<GovLanguageDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GovLanguageDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
govLanguageService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GovLanguageDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
govLanguageService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
govLanguageService.delete(ids);
return new Result();
}
}

156
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovMenuController.java

@ -1,156 +0,0 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.exception.ErrorCode;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GovMenuDTO;
import com.epmet.dto.result.MenuResourceDTO;
import com.epmet.service.GovMenuService;
import com.epmet.service.GovResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
*
* 菜单管理
*
* @author zhaoqifeng
* @date 2020/3/17 16:35
*/
@RestController
@RequestMapping("menu")
public class GovMenuController {
@Autowired
private GovMenuService govMenuService;
@Autowired
private GovResourceService govResourceService;
@GetMapping("page")
public Result<PageData<GovMenuDTO>> page(@RequestParam Map<String, Object> params){
PageData<GovMenuDTO> page = govMenuService.page(params);
return new Result<PageData<GovMenuDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GovMenuDTO> get(@PathVariable("id") String id){
GovMenuDTO data = govMenuService.get(id);
//菜单资源列表
List<MenuResourceDTO> resourceList = govResourceService.getMenuResourceList(id);
return new Result<GovMenuDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GovMenuDTO dto, @LoginUser TokenDto tokenDto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
govMenuService.save(dto,tokenDto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GovMenuDTO dto, @LoginUser TokenDto tokenDto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
govMenuService.update(dto,tokenDto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
govMenuService.delete(ids);
return new Result();
}
@DeleteMapping("{id}")
public Result delete(@PathVariable("id") String id, @LoginUser TokenDto tokenDto){
//效验数据
AssertUtils.isNull(id, "id");
//判断是否有子菜单或按钮
List<GovMenuDTO> list = govMenuService.getListPid(id);
if(list.size() > 0){
return new Result().error(ErrorCode.SUB_MENU_EXIST);
}
govMenuService.delete(id, tokenDto);
return new Result();
}
/**
* 获取菜单列表
* @param type 类型
* @return Result<List<GovMenuDTO>>
*/
@GetMapping("list")
public Result<List<GovMenuDTO>> list(Integer type){
List<GovMenuDTO> list = govMenuService.getMenuList(type);
return new Result<List<GovMenuDTO>>().ok(list);
}
/**
* 导航
* @param tokenDto token
* @return List<GovMenuDTO>
*/
@GetMapping("nav")
public Result<List<GovMenuDTO>> nav(@LoginUser TokenDto tokenDto){
List<GovMenuDTO> list = govMenuService.getUserMenuNavList(tokenDto);
return new Result<List<GovMenuDTO>>().ok(list);
}
/**
* 权限标识
* @param tokenDto token
* @return Set<String>
*/
@GetMapping("permissions")
public Result<Set<String>> permissions(@LoginUser TokenDto tokenDto){
Set<String> set = govMenuService.getUserPermissions(tokenDto);
return new Result<Set<String>>().ok(set);
}
/**
* 角色菜单权限
* @param tokenDto token
* @return
*/
@GetMapping("select")
public Result<List<GovMenuDTO>> select(@LoginUser TokenDto tokenDto){
List<GovMenuDTO> list = govMenuService.getUserMenuList(tokenDto, null);
return new Result<List<GovMenuDTO>>().ok(list);
}
/**
* @param tokenDto
* @return com.epmet.commons.tools.utils.Result
* @Author yinzuomei
* @Description 运营端用户退出系统清空菜单和操作权限
* @Date 2020/5/21 18:07
**/
@GetMapping("cleargovuseraccess")
public Result clearGovUserAccess(@LoginUser TokenDto tokenDto) {
govMenuService.clearOperUserAccess(tokenDto.getApp(), tokenDto.getClient(), tokenDto.getUserId());
return new Result();
}
}

84
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovResourceController.java

@ -1,84 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GovResourceDTO;
import com.epmet.service.GovResourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 资源管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@RestController
@RequestMapping("govresource")
public class GovResourceController {
@Autowired
private GovResourceService govResourceService;
@GetMapping("page")
public Result<PageData<GovResourceDTO>> page(@RequestParam Map<String, Object> params){
PageData<GovResourceDTO> page = govResourceService.page(params);
return new Result<PageData<GovResourceDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GovResourceDTO> get(@PathVariable("id") String id){
GovResourceDTO data = govResourceService.get(id);
return new Result<GovResourceDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GovResourceDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
govResourceService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GovResourceDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
govResourceService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
govResourceService.delete(ids);
return new Result();
}
}

104
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleController.java

@ -1,104 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GovRoleDTO;
import com.epmet.service.GovRoleMenuService;
import com.epmet.service.GovRoleService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 角色管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@RestController
@RequestMapping("govrole")
public class GovRoleController {
@Autowired
private GovRoleService govRoleService;
@Autowired
private GovRoleMenuService govRoleMenuService;
@GetMapping("page")
public Result<PageData<GovRoleDTO>> page(@RequestParam Map<String, Object> params){
PageData<GovRoleDTO> page = govRoleService.page(params);
return new Result<PageData<GovRoleDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GovRoleDTO> get(@PathVariable("id") String id){
GovRoleDTO data = govRoleService.get(id);
//查询角色对应的菜单
List<String> menuIdList = govRoleMenuService.getMenuIdList(id);
data.setMenuIdList(menuIdList);
return new Result<GovRoleDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GovRoleDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
govRoleService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GovRoleDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
govRoleService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
govRoleService.delete(ids);
return new Result();
}
@GetMapping("list")
@ApiOperation("列表")
public Result<List<GovRoleDTO>> list(){
List<GovRoleDTO> data = govRoleService.list(new HashMap<>(1));
return new Result<List<GovRoleDTO>>().ok(data);
}
}

85
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleMenuController.java

@ -1,85 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GovRoleMenuDTO;
import com.epmet.service.GovRoleMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* 角色菜单关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@RestController
@RequestMapping("govrolemenu")
public class GovRoleMenuController {
@Autowired
private GovRoleMenuService govRoleMenuService;
@GetMapping("page")
public Result<PageData<GovRoleMenuDTO>> page(@RequestParam Map<String, Object> params){
PageData<GovRoleMenuDTO> page = govRoleMenuService.page(params);
return new Result<PageData<GovRoleMenuDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GovRoleMenuDTO> get(@PathVariable("id") String id){
GovRoleMenuDTO data = govRoleMenuService.get(id);
return new Result<GovRoleMenuDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GovRoleMenuDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
govRoleMenuService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GovRoleMenuDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
govRoleMenuService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
govRoleMenuService.delete(ids);
return new Result();
}
}

132
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleUserController.java

@ -1,132 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.AssertUtils;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.commons.tools.validator.group.AddGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.dto.GovRoleUserDTO;
import com.epmet.service.GovRoleUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 角色用户关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@RestController
@RequestMapping("govroleuser")
public class GovRoleUserController {
@Autowired
private GovRoleUserService govRoleUserService;
@GetMapping("page")
public Result<PageData<GovRoleUserDTO>> page(@RequestParam Map<String, Object> params){
PageData<GovRoleUserDTO> page = govRoleUserService.page(params);
return new Result<PageData<GovRoleUserDTO>>().ok(page);
}
@GetMapping("{id}")
public Result<GovRoleUserDTO> get(@PathVariable("id") String id){
GovRoleUserDTO data = govRoleUserService.get(id);
return new Result<GovRoleUserDTO>().ok(data);
}
@PostMapping
public Result save(@RequestBody GovRoleUserDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
govRoleUserService.save(dto);
return new Result();
}
@PutMapping
public Result update(@RequestBody GovRoleUserDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
govRoleUserService.update(dto);
return new Result();
}
@DeleteMapping
public Result delete(@RequestBody String[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
govRoleUserService.delete(ids);
return new Result();
}
/**
* 获取权限id列表
* @param id 用户id
* @return List<String>
* @author zhaoqifeng
*/
@GetMapping("getRoleIdList/{id}")
public Result<List<String>>getRoleIdList(@PathVariable("id") String id) {
List<String> list = govRoleUserService.getRoleIdList(id);
return new Result<List<String>>().ok(list);
}
/**
* 保存更新权限
* @param userId 用户id
* @param roleIdList 权限列表
* @author zhaoqifeng
*/
@PostMapping("saveOrUpdateRole")
public Result saveOrUpdate(@RequestParam("userId") String userId, @RequestBody List<String> roleIdList) {
govRoleUserService.saveOrUpdate(userId, roleIdList);
return new Result();
}
/**
* 根据用户id删除角色用户关系
* @param id 用户id
* @return Result
*/
@PostMapping("deleteByUserId")
public Result deleteByUserId(String id) {
govRoleUserService.deleteByUserId(id);
return new Result();
}
/**
* 根据用户ids删除角色用户关系
* @param ids 用户ids
* @return Result
*/
@PostMapping("deleteByUserIds")
public Result deleteByUserIds(@RequestBody String[] ids) {
govRoleUserService.deleteByUserIds(ids);
return new Result();
}
}

21
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/LbController.java

@ -1,21 +0,0 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.commons.util.InetUtils;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class LbController {
@Autowired
private InetUtils inetUtils;
@PostMapping("get-host")
public Result getHost() {
String ipAddress = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
return new Result().ok(ipAddress);
}
}

41
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/RoleController.java

@ -1,41 +0,0 @@
package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.form.InitDefaultOperationsFormDTO;
import com.epmet.dto.result.RoleOperationResultDTO;
import com.epmet.service.RoleOperationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@RestController
@RequestMapping("role")
public class RoleController {
@Autowired
private RoleOperationService roleOperationService;
/**
* 查询角色对应的操作列表
* @param roleId
* @return
*/
@PostMapping("operations/{roleId}")
public Result<List<RoleOperationResultDTO>> listOperationsByRoleId(@PathVariable("roleId") String roleId) {
List<RoleOperationResultDTO> roleOperationResultDTOS = roleOperationService.listOperationsByRoleId(roleId);
return new Result<List<RoleOperationResultDTO>>().ok(roleOperationResultDTOS);
}
/**
* 批量为角色ID初始化操作权限列表
* @param formDTO
* @return
*/
@PostMapping("initdefaultoperationsforroles")
public Result initDefaultOperationsForRoles(@RequestBody InitDefaultOperationsFormDTO formDTO) {
List<InitDefaultOperationsFormDTO.InitDefaultOpesRoleDTO> roles = formDTO.getRoles();
roleOperationService.initDefaultOperationsForRoles(roles);
return new Result();
}
}

25
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/TestController.java

@ -1,25 +0,0 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.ExternalRequestAuth;
import com.epmet.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("test")
public class TestController {
@Autowired
private TestService testService;
@ExternalRequestAuth
@GetMapping("test")
public void test() {
System.out.println("TestController -> test()");
testService.test();
}
}

28
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovLanguageDao.java

@ -1,28 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.GovLanguageEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 国际化
*
* @author Mark sunlightcs@gmail.com
*/
@Mapper
public interface GovLanguageDao extends BaseDao<GovLanguageEntity> {
GovLanguageEntity getLanguage(GovLanguageEntity entity);
void updateLanguage(GovLanguageEntity entity);
void insertOperLanguageEntity(GovLanguageEntity entity);
}

52
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovMenuDao.java

@ -1,52 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.GovMenuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 菜单管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface GovMenuDao extends BaseDao<GovMenuEntity> {
GovMenuEntity getById(@Param("id") String id, @Param("language") String language);
/**
* 查询所有菜单列表
*
* @param type 菜单类型
* @param language 语言
*/
List<GovMenuEntity> getMenuList(@Param("type") Integer type, @Param("language") String language);
/**
* 查询用户菜单列表
*
* @param userId 用户ID
* @param type 菜单类型
* @param language 语言
*/
List<GovMenuEntity> getUserMenuList(@Param("userId") String userId, @Param("type") Integer type, @Param("language") String language);
/**
* 根据父菜单查询子菜单
* @param pid 父菜单ID
*/
List<GovMenuEntity> getListPid(String pid);
}

48
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovResourceDao.java

@ -1,48 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.GovResourceEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 资源管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface GovResourceDao extends BaseDao<GovResourceEntity> {
/**
* 根据资源编码删除对应的资源
* @param code 资源编码
*/
void deleteByCode(String code);
/**
* 获取资源列表
* @param menuId 菜单ID
*/
List<GovResourceEntity> getMenuResourceList(String menuId);
/**
* 获取所有资源列表
*/
List<GovResourceEntity> getResourceList();
/**
* 获取用户资源列表
* @param userId 用户ID
*/
List<GovResourceEntity> getUserResourceList(@Param("userId") String userId);
}

24
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleDao.java

@ -1,24 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.GovRoleEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 角色管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface GovRoleDao extends BaseDao<GovRoleEntity> {
}

49
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleMenuDao.java

@ -1,49 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.GovRoleMenuEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 角色菜单关系
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface GovRoleMenuDao extends BaseDao<GovRoleMenuEntity> {
/**
* 根据角色ID获取菜单ID列表
*/
List<String> getMenuIdList(String roleId);
/**
* 根据角色id删除角色菜单关系
* @param roleId 角色id
*/
void deleteByRoleId(String roleId);
/**
* 根据菜单id删除角色菜单关系
* @param menuId 菜单id
*/
void deleteByMenuId(String menuId);
/**
* 根据角色ids删除角色菜单关系
* @param roleIds 角色ids
*/
void deleteByRoleIds(String[] roleIds);
}

57
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleUserDao.java

@ -1,57 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.GovRoleUserEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 角色用户关系
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Mapper
public interface GovRoleUserDao extends BaseDao<GovRoleUserEntity> {
/**
* 根据角色ids删除角色用户关系
* @param roleIds 角色ids
*/
void deleteByRoleIds(String[] roleIds);
/**
* 根据用户ids删除角色用户关系
* @param userIds 用户ids
*/
void deleteByUserIds(String[] userIds);
/**
* 根据角色id删除角色用户关系
* @param roleId 角色id
*/
void deleteByRoleId(String roleId);
/**
* 根据用户id删除角色用户关系
* @param userId 用户id
*/
void deleteByUserId(String userId);
/**
* 角色ID列表
* @param userId 用户ID
*
* @return
*/
List<String> getRoleIdList(String userId);
}

38
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationDao.java

@ -1,38 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.OperationEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 操作类型表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-30
*/
@Mapper
public interface OperationDao extends BaseDao<OperationEntity> {
List<OperationEntity> listAllOperationEntities();
List<OperationEntity> listAllValidOperationEntities();
}

57
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationScopeDao.java

@ -1,57 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.RoleOpeScopeResultDTO;
import com.epmet.entity.OperationScopeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Scope;
import java.util.List;
import java.util.Set;
/**
* 权限范围表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-24
*/
@Mapper
public interface OperationScopeDao extends BaseDao<OperationScopeEntity> {
/**
* 查询角色的操作key对应操作范围列表
* @param roleId 角色id
* @param operationKey 操作key
* @return
*/
Set<RoleOpeScopeResultDTO> listOperationScopesByRoleId(@Param("roleId") String roleId,
@Param("operationKey") String operationKey);
/**
* 查询角色所有operation及其范围
* @param roleId
*/
List<RoleOpeScopeResultDTO> listAllRoleOperationScopesByRoleId(String roleId);
String getDefaultScopeKeyForOperation(@Param("operationKey") String operationKey);
String getScopeIndexByScopeKey(@Param("scopeKey") String scopeKey);
}

64
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationScopeDefaultDao.java

@ -1,64 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.AccessConfigOpeDefaultScopesResultDTO;
import com.epmet.dto.result.OperationScopeDefaultResultDTO;
import com.epmet.entity.OperationScopeDefaultEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 默认操作范围表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-17
*/
@Mapper
public interface OperationScopeDefaultDao extends BaseDao<OperationScopeDefaultEntity> {
List<OperationScopeDefaultEntity> listAllValid();
/**
* 根据角色key和操作key查询默认操作权限列表
* @param roleKey
* @return
*/
List<OperationScopeDefaultResultDTO> listDefaultOpeScopes(@Param("roleKey") String roleKey);
/**
* 查询操作的默认范围
* @param roleKey
* @param operationKey
* @return
*/
List<AccessConfigOpeDefaultScopesResultDTO> listOpeDefaultScopes4Config(
@Param("roleKey") String roleKey,
@Param("operationKey") String operationKey);
List<OperationScopeDefaultEntity> listOpeDefaultScopesByRoleAndOpeKey(
@Param("roleKey") String roleKey,
@Param("operationKey") String operationKey);
int delete(
@Param("roleKey") String roleKey,
@Param("operationKey") String operationKey,
@Param("scopeKey") String scopeKey);
}

47
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleOperationDao.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.AccessConfigOpesResultDTO;
import com.epmet.dto.result.RoleOperationResultDTO;
import com.epmet.entity.RoleOperationEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 角色能进行那些操作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-22
*/
@Mapper
public interface RoleOperationDao extends BaseDao<RoleOperationEntity> {
List<RoleOperationResultDTO> listOperationsByRoleId(@Param("roleId") String roleId);
List<AccessConfigOpesResultDTO> listOpesForAccessConfig(@Param("roleId") String roleId);
void deleteRoleOpe(@Param("roleId") String roleId, @Param("opeKey") String opeKey);
RoleOperationEntity getRoleOpe(@Param("roleId") String roleId, @Param("opeKey") String opeKey);
int enableRoleOpe(@Param("roleId") String roleId, @Param("opeKey") String opeKey);
}

57
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleOperationDefaultDao.java

@ -1,57 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.AccessConfigOpeDefaultScopesResultDTO;
import com.epmet.dto.result.RoleOperationDefaultResultDTO;
import com.epmet.entity.RoleOperationDefaultEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
import java.util.List;
/**
* 角色默认的可操作功能列表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-05-21
*/
@Mapper
public interface RoleOperationDefaultDao extends BaseDao<RoleOperationDefaultEntity> {
/**
* 查询可用
* @return
*/
List<RoleOperationDefaultResultDTO> listAllValid();
/**
* 查询某个roleKey的所有默认操作权限
* @param roleKey
* @return
*/
List<RoleOperationDefaultResultDTO> listByRoleKey(@Param("roleKey") String roleKey);
List<RoleOperationDefaultResultDTO> listRoleDefaultOpsByRoleKey(@Param("roleKey") String roleKey);
int deleteByRoleKeyAndOpeKey(
@Param("roleKey") String roleKey,
@Param("operationKey") String operationKey);
}

85
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleScopeDao.java

@ -1,85 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.AccessConfigScopeResultDTO;
import com.epmet.entity.RoleScopeEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* 角色能操作哪些范围
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-24
*/
@Mapper
public interface RoleScopeDao extends BaseDao<RoleScopeEntity> {
/**
* 权限配置列出可选项
* @param roleId
* @param operationKey
* @return
*/
List<AccessConfigScopeResultDTO> listScopeOptionsForAccessConfig(@Param("roleId") String roleId, @Param("operationKey") String operationKey);
/**
*
* @param roleId
* @param operationKey
* @return
*/
List<RoleScopeEntity> listScopeEntities(@Param("roleId") String roleId, @Param("operationKey") String operationKey);
/**
* 使用roleId+OperationKey+ScopeKey删除
* @param roleId
* @param operationKey
* @param scopeKeys2Remove
* @return
*/
int deleteByRoleIdAndOpeKey(@Param("roleId") String roleId,
@Param("operationKey") String operationKey,
@Param("scopeKeys2Remove") Set<String> scopeKeys2Remove);
/**
* 启用
* @param roleId
* @param operationKey
* @param scopeKey
* @return
*/
int enableByRoleIdAndOpeKey(@Param("roleId") String roleId,
@Param("operationKey") String operationKey,
@Param("scopeKey") String scopeKey);
/**
* 使用RoleId + operationKey + scopeKey
* @param roleId
* @param operationKey
* @param scopeKey
*/
RoleScopeEntity getByRoleIdAndOpeKey(@Param("roleId") String roleId,
@Param("operationKey") String operationKey,
@Param("scopeKey") String scopeKey);
}

49
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovLanguageEntity.java

@ -1,49 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
* 国际化
*
* @author Mark sunlightcs@gmail.com
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("gov_language")
public class GovLanguageEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 表名
*/
private String tableName;
/**
* 表主键
*/
private String tableId;
/**
* 字段名
*/
private String fieldName;
/**
* 字段值
*/
private String fieldValue;
/**
* 语言
*/
private String language;
}

69
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovMenuEntity.java

@ -1,69 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 菜单管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("gov_menu")
public class GovMenuEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 上级ID一级菜单为0
*/
private String pid;
/**
* 菜单名称
*/
@TableField(exist = false)
private String name;
/**
* 菜单URL
*/
private String url;
/**
* 类型 0菜单 1按钮
*/
private Integer type;
/**
* 菜单图标
*/
private String icon;
/**
* 权限标识sys:menu:save
*/
private String permissions;
/**
* 排序
*/
private Integer sort;
/**
* 上级菜单名称
*/
@TableField(exist = false)
private String parentName;
/**
* 是否显示1显示 0不显示
*/
private Integer showFlag;
}

53
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovResourceEntity.java

@ -1,53 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 资源管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("gov_resource")
public class GovResourceEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 资源编码如菜单ID
*/
private String resourceCode;
/**
* 资源名称
*/
private String resourceName;
/**
* 资源URL
*/
private String resourceUrl;
/**
* 请求方式GETPOSTPUTDELETE
*/
private String resourceMethod;
/**
* 菜单标识 0非菜单资源 1菜单资源
*/
private Integer menuFlag;
/**
* 认证等级 0权限认证 1登录认证 2无需认证
*/
private Integer authLevel;
}

44
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleEntity.java

@ -1,44 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 角色管理
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("gov_role")
public class GovRoleEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 角色名称
*/
private String name;
/**
* 备注
*/
private String remark;
/**
* 部门ID
*/
@TableField(fill = FieldFill.INSERT)
private Long deptId;
}

36
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleMenuEntity.java

@ -1,36 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 角色菜单关系
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("gov_role_menu")
public class GovRoleMenuEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 角色ID
*/
private String roleId;
/**
* 菜单ID
*/
private String menuId;
}

37
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleUserEntity.java

@ -1,37 +0,0 @@
/**
* Copyright (c) 2018 人人开源 All rights reserved.
*
* https://www.renren.io
*
* 版权所有侵权必究
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 角色用户关系
*
* @author Mark sunlightcs@gmail.com
* @since 1.0.0
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("gov_role_user")
public class GovRoleUserEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 角色ID
*/
private String roleId;
/**
* 用户ID
*/
private String userId;
}

56
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationEntity.java

@ -1,56 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 操作类型表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-30
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("operation")
public class OperationEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
*
*/
private String operationKey;
/**
*
*/
private String operationName;
/**
* 操作简介
*/
private String brief;
}

53
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationScopeDefaultEntity.java

@ -1,53 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 默认操作范围表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-06-17
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("operation_scope_default")
public class OperationScopeDefaultEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
private String roleKey;
/**
* 操作key
*/
private String operationKey;
/**
* 范围key
*/
private String scopeKey;
}

55
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationScopeEntity.java

@ -1,55 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 权限范围表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-24
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("operation_scope")
public class OperationScopeEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 范围key
*/
private String scopeKey;
/**
* 范围名称
*/
private String scopeName;
private String scopeIndex;
private String series;
private Integer sort;
}

42
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleOperationDefaultEntity.java

@ -1,42 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("role_operation_default")
public class RoleOperationDefaultEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 角色KEY
*/
private String roleKey;
/**
* 操作key
*/
private String operationKey;
}

51
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleOperationEntity.java

@ -1,51 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 角色能进行那些操作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-22
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("role_operation")
public class RoleOperationEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 角色ID
*/
private String roleId;
/**
* 操作key
*/
private String operationKey;
}

56
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleScopeEntity.java

@ -1,56 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 角色能操作哪些范围
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-24
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("role_scope")
public class RoleScopeEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 角色ID
*/
private String roleId;
/**
* 操作key
*/
private String operationKey;
/**
* 范围Key
*/
private String scopeKey;
}

62
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/excel/RoleOperationExcel.java

@ -1,62 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
import java.util.Date;
/**
* 角色能进行那些操作
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-22
*/
@Data
public class RoleOperationExcel {
@Excel(name = "")
private String id;
@Excel(name = "角色ID")
private String roleId;
@Excel(name = "操作key")
private String operationKey;
@Excel(name = "是否删除,0:未删除,1:已删除")
private Integer delFlag;
@Excel(name = "乐观锁")
private Integer revision;
@Excel(name = "创建者id")
private String createdBy;
@Excel(name = "创建时间")
private Date createdTime;
@Excel(name = "更新者id")
private String updatedBy;
@Excel(name = "更新时间")
private Date updatedTime;
}

77
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java

@ -1,77 +0,0 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.GovStaffRoleDTO;
import com.epmet.dto.OperUserDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.form.StaffGridVisitedFormDTO;
import com.epmet.dto.form.StaffRoleFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.LatestCustomerResultDTO;
import com.epmet.feign.fallback.EpmetUserFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* @Description
* @Author sun
*/
//, url = "localhost:8087"
@FeignClient(name = ServiceConstant.EPMET_USER_SERVER, fallback = EpmetUserFeignClientFallback.class)
public interface EpmetUserFeignClient {
/**
* 获取最近一次登录的客户信息
*
* @param userId
* @return
*/
@GetMapping("/epmetuser/staffagencyvisited/getlatestcustomer/{userId}")
Result<LatestCustomerResultDTO> getLatestCustomer(@PathVariable("userId") String userId);
/**
* @Description 查询工作人员上次登录的网格
* @Param customerId ; staffId
* @return Result<CustomerGridByUserIdResultDTO>
* @Author wangc
* @Date 2020.04.23 10:44
**/
@PostMapping(value = "/epmetuser/staffgridvisited/getstafflatestgrid")
Result<CustomerGridByUserIdResultDTO> getStaffLatestGrid(LatestGridFormDTO latestGridFormDTO);
/**
* @param staffGridVisitedFormDTO
* @return com.epmet.commons.tools.utils.Result
* @Author yinzuomei
* @Description 保存网格访问记录
* @Date 2020/4/23 13:27
**/
@PostMapping(value = "/epmetuser/staffgridvisited/savestaffgridvisitedrecord", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
Result saveStaffGridVisitedRecord(@RequestBody StaffGridVisitedFormDTO staffGridVisitedFormDTO);
/**
* 查询工作人员的角色
* @return
*/
@PostMapping("/epmetuser/staffrole/staffroles")
Result<List<GovStaffRoleDTO>> getRolesOfStaff(StaffRoleFormDTO staffRoleFormDTO);
/**
*
* 根据id查询运营人员详情
*
* @param operUserId oper_user表主键
* @return com.epmet.commons.tools.utils.Result<java.util.List <com.epmet.dto.OperUserDTO>>
* @author zhaoqifeng
* @date 2020/3/19 09:28
**/
@GetMapping("/operuser/queryOperUserDtoById/{operUserId}")
Result<OperUserDTO> info(@PathVariable("operUserId") String operUserId);
}

34
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java

@ -1,34 +0,0 @@
package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.feign.fallback.GovOrgFeignClientFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
/**
* @Description
* @Author sun
*/
//@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallBack.class, url = "localhost:8092")
@FeignClient(name = ServiceConstant.GOV_ORG_SERVER, fallback = GovOrgFeignClientFallBack.class)
public interface GovOrgFeignClient {
/**
* 根据Id查询agency
* @param agencyId
* @return
*/
@PostMapping("/gov/org/agency/agencybyid/{agencyId}")
Result<CustomerAgencyDTO> getAgencyById(@PathVariable("agencyId") String agencyId);
/**
* 根据staffId查询所属的组织机构
* @param staffId
* @return
*/
@PostMapping("/gov/org/agency/agencybystaff/{staffId}")
Result<CustomerAgencyDTO> getAgencyByStaff(@PathVariable("staffId") String staffId);
}

49
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java

@ -1,49 +0,0 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.GovStaffRoleDTO;
import com.epmet.dto.OperUserDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.form.StaffGridVisitedFormDTO;
import com.epmet.dto.form.StaffRoleFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.LatestCustomerResultDTO;
import com.epmet.feign.EpmetUserFeignClient;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @Description
* @Author sun
*/
@Component
public class EpmetUserFeignClientFallback implements EpmetUserFeignClient {
@Override
public Result<LatestCustomerResultDTO> getLatestCustomer(String userId) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getLatestCustomer", userId);
}
@Override
public Result<List<GovStaffRoleDTO>> getRolesOfStaff(StaffRoleFormDTO staffRoleFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getRolesOfStaff");
}
@Override
public Result<OperUserDTO> info(String operUserId) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "info", operUserId);
}
@Override
public Result<CustomerGridByUserIdResultDTO> getStaffLatestGrid(LatestGridFormDTO latestGridFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getStaffLatestGrid",latestGridFormDTO);
}
@Override
public Result saveStaffGridVisitedRecord(StaffGridVisitedFormDTO staffGridVisitedFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "saveStaffGridVisitedRecord", staffGridVisitedFormDTO);
}
}

31
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java

@ -1,31 +0,0 @@
package com.epmet.feign.fallback;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.ModuleUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.dto.form.LatestGridFormDTO;
import com.epmet.dto.result.CustomerGridByUserIdResultDTO;
import com.epmet.dto.result.LatestCustomerResultDTO;
import com.epmet.feign.GovOrgFeignClient;
import org.springframework.stereotype.Component;
import java.util.List;
/**
* @Description
* @Author sun
*/
@Component
public class GovOrgFeignClientFallBack implements GovOrgFeignClient {
@Override
public Result<CustomerAgencyDTO> getAgencyById(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyById", agencyId);
}
@Override
public Result<CustomerAgencyDTO> getAgencyByStaff(String staffId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyByStaff", staffId);
}
}

47
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovLanguageRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 国际化
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@Component
public class GovLanguageRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

74
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovMenuRedis.java

@ -1,74 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import com.epmet.commons.tools.utils.HttpContextUtils;
import com.epmet.dto.GovMenuDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Set;
/**
* 菜单管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@Component
public class GovMenuRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(String userId, String app, String client) {
redisUtils.deleteByPattern(RedisKeys.getUserMenuNavKey(userId, app, client, HttpContextUtils.getLanguage()));
redisUtils.delete(RedisKeys.getUserPermissionsKey(userId, app, client));
}
public void set(){
}
public String get(String id){
return null;
}
public void setUserMenuNavList(String userId, String app, String client, List<GovMenuDTO> menuList){
String key = RedisKeys.getUserMenuNavKey(userId, app, client, HttpContextUtils.getLanguage());
redisUtils.set(key, menuList);
}
public List<GovMenuDTO> getUserMenuNavList(String userId, String app, String client){
String key = RedisKeys.getUserMenuNavKey(userId, app, client, HttpContextUtils.getLanguage());
return (List<GovMenuDTO>)redisUtils.get(key);
}
public void setUserPermissions(String userId, String app, String client, Set<String> permsSet){
String key = RedisKeys.getUserPermissionsKey(userId, app, client);
redisUtils.set(key, permsSet);
}
public Set<String> getUserPermissions(String userId, String app, String client){
String key = RedisKeys.getUserPermissionsKey(userId, app, client);
return (Set<String>)redisUtils.get(key);
}
}

50
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovResourceRedis.java

@ -1,50 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 资源管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@Component
public class GovResourceRedis {
@Autowired
private RedisUtils redisUtils;
public void delete() {
String key = RedisKeys.getSysResourceKey();
redisUtils.delete(key);
}
public void set(){
}
public String get(String id){
return null;
}
}

47
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleMenuRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 角色菜单关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@Component
public class GovRoleMenuRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 角色管理
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@Component
public class GovRoleRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

47
gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleUserRedis.java

@ -1,47 +0,0 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.redis;
import com.epmet.commons.tools.redis.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 角色用户关系
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-03-18
*/
@Component
public class GovRoleUserRedis {
@Autowired
private RedisUtils redisUtils;
public void delete(Object[] ids) {
}
public void set(){
}
public String get(String id){
return null;
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save