menuIdList;
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovRoleMenuDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovRoleMenuDTO.java
new file mode 100644
index 0000000000..eacde30cf3
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovRoleMenuDTO.java
@@ -0,0 +1,82 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovRoleUserDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovRoleUserDTO.java
new file mode 100644
index 0000000000..d3881edeb2
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/GovRoleUserDTO.java
@@ -0,0 +1,82 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/OperationScopeDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/OperationScopeDTO.java
new file mode 100644
index 0000000000..35885d7f8c
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/OperationScopeDTO.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/RoleOperationDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/RoleOperationDTO.java
new file mode 100644
index 0000000000..bda4931386
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/RoleOperationDTO.java
@@ -0,0 +1,82 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/RoleScopeDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/RoleScopeDTO.java
new file mode 100644
index 0000000000..17f8866215
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/RoleScopeDTO.java
@@ -0,0 +1,86 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigAdd4RoletFormDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigAdd4RoletFormDTO.java
new file mode 100644
index 0000000000..85b9e9d68d
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigAdd4RoletFormDTO.java
@@ -0,0 +1,17 @@
+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 scopeKeys;
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOpeDefaultScopesFormDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOpeDefaultScopesFormDTO.java
new file mode 100644
index 0000000000..86dad3a7a3
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOpeDefaultScopesFormDTO.java
@@ -0,0 +1,26 @@
+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 scopeKeys;
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOpesFormDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOpesFormDTO.java
new file mode 100644
index 0000000000..8a84ddf960
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOpesFormDTO.java
@@ -0,0 +1,16 @@
+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 opes;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOptionsFormDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOptionsFormDTO.java
new file mode 100644
index 0000000000..b96e438e0b
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigOptionsFormDTO.java
@@ -0,0 +1,16 @@
+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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigRoleDefaultOpesFormDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigRoleDefaultOpesFormDTO.java
new file mode 100644
index 0000000000..cb6f196403
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigRoleDefaultOpesFormDTO.java
@@ -0,0 +1,18 @@
+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 operationKeys;
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigSaveConfigDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigSaveConfigDTO.java
new file mode 100644
index 0000000000..6a918b5bb2
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessConfigSaveConfigDTO.java
@@ -0,0 +1,18 @@
+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 scopeKeys;
+ private Set settingKeys;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessSettingFormDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessSettingFormDTO.java
new file mode 100644
index 0000000000..ecd5e6b99f
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/AccessSettingFormDTO.java
@@ -0,0 +1,12 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+/**
+ * 查询拥有的权限的DTO,非后台配置用
+ */
+@Data
+public class AccessSettingFormDTO {
+ private String roleId;
+ private String operationKey;
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/GetSQLFilterFormDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/GetSQLFilterFormDTO.java
new file mode 100644
index 0000000000..4901eca2bb
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/GetSQLFilterFormDTO.java
@@ -0,0 +1,29 @@
+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 gridIds;
+
+ private Set departmentIds;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/HasSpecifiedPermissionFormDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/HasSpecifiedPermissionFormDTO.java
new file mode 100644
index 0000000000..4dabc98dd0
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/HasSpecifiedPermissionFormDTO.java
@@ -0,0 +1,22 @@
+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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/InitDefaultOperationsFormDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/InitDefaultOperationsFormDTO.java
new file mode 100644
index 0000000000..d7b487ad67
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/InitDefaultOperationsFormDTO.java
@@ -0,0 +1,20 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class InitDefaultOperationsFormDTO {
+
+ private List roles;
+
+ @Data
+ public static class InitDefaultOpesRoleDTO {
+ public InitDefaultOpesRoleDTO() {
+ }
+
+ private String roleId;
+ private String roleKey;
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/ListOpePermsFormDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/ListOpePermsFormDTO.java
new file mode 100644
index 0000000000..a7b1b2a7df
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/ListOpePermsFormDTO.java
@@ -0,0 +1,18 @@
+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;
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/OperationScopeFormDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/OperationScopeFormDTO.java
new file mode 100644
index 0000000000..af992b7d51
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/OperationScopeFormDTO.java
@@ -0,0 +1,18 @@
+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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/StaffPermCacheFormDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/StaffPermCacheFormDTO.java
new file mode 100644
index 0000000000..a35af017c9
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/form/StaffPermCacheFormDTO.java
@@ -0,0 +1,59 @@
+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 permissions;
+
+ /**
+ * 角色列表
+ */
+ private Set roleIdList;
+
+ /**
+ * 当前所在网格id
+ */
+ private String gridId;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOpeDefaultScopesResultDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOpeDefaultScopesResultDTO.java
new file mode 100644
index 0000000000..53023bd459
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOpeDefaultScopesResultDTO.java
@@ -0,0 +1,16 @@
+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;
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOpesResultDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOpesResultDTO.java
new file mode 100644
index 0000000000..bf24f851d2
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOpesResultDTO.java
@@ -0,0 +1,13 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+@Data
+public class AccessConfigOpesResultDTO {
+
+ private String operationKey;
+ private String operationName;
+ private String brief;
+ private Boolean assigned;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOptionsResultDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOptionsResultDTO.java
new file mode 100644
index 0000000000..4959a3af40
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigOptionsResultDTO.java
@@ -0,0 +1,10 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class AccessConfigOptionsResultDTO {
+ private List scopeOptions;
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigScopeResultDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigScopeResultDTO.java
new file mode 100644
index 0000000000..e1eb02e9fb
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessConfigScopeResultDTO.java
@@ -0,0 +1,15 @@
+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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessSettingResultDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessSettingResultDTO.java
new file mode 100644
index 0000000000..d00d440e63
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/AccessSettingResultDTO.java
@@ -0,0 +1,58 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/LoginUserDetailsResultDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/LoginUserDetailsResultDTO.java
new file mode 100644
index 0000000000..2a14ada3fd
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/LoginUserDetailsResultDTO.java
@@ -0,0 +1,59 @@
+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 roleIdList;
+ private List roleList;
+
+ /**
+ * 部门id列表
+ */
+ private Set deptIdList;
+
+ /**
+ * 当前登录的组织id(顶级)
+ */
+ private String agencyId;
+
+ /**
+ * 组织ID
+ */
+ private String orgIdPath;
+
+ /**
+ * 网格ID列表
+ */
+ private Set gridIdList;
+
+ /**
+ * 当前工作人员进入的客户id
+ */
+ private String customerId;
+
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/MenuResourceDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/MenuResourceDTO.java
new file mode 100644
index 0000000000..86df7d55ca
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/MenuResourceDTO.java
@@ -0,0 +1,29 @@
+/**
+ * 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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/OperationScopeDefaultResultDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/OperationScopeDefaultResultDTO.java
new file mode 100644
index 0000000000..4c1f593712
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/OperationScopeDefaultResultDTO.java
@@ -0,0 +1,20 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+@Data
+public class OperationScopeDefaultResultDTO {
+
+ private String roleKey;
+
+ /**
+ * 操作key
+ */
+ private String operationKey;
+
+ /**
+ * 范围key
+ */
+ private String scopeKey;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOpeScopeResultDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOpeScopeResultDTO.java
new file mode 100644
index 0000000000..d950f7dc85
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOpeScopeResultDTO.java
@@ -0,0 +1,36 @@
+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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOperationDefaultResultDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOperationDefaultResultDTO.java
new file mode 100755
index 0000000000..6961dad6ca
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOperationDefaultResultDTO.java
@@ -0,0 +1,60 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOperationResultDTO.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOperationResultDTO.java
new file mode 100644
index 0000000000..dc7fc1559e
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/dto/result/RoleOperationResultDTO.java
@@ -0,0 +1,87 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/MenuFlagEnum.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/MenuFlagEnum.java
new file mode 100644
index 0000000000..2a880a728a
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/MenuFlagEnum.java
@@ -0,0 +1,36 @@
+/**
+ * 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;
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/MenuTypeEnum.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/MenuTypeEnum.java
new file mode 100644
index 0000000000..7132fa2ce3
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/MenuTypeEnum.java
@@ -0,0 +1,36 @@
+/**
+ * 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;
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/RegionLeafEnum.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/RegionLeafEnum.java
new file mode 100644
index 0000000000..36300e201f
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/RegionLeafEnum.java
@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) 2019 人人开源 All rights reserved.
+ *
+ * https://www.renren.io
+ *
+ * 版权所有,侵权必究!
+ */
+
+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;
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/RegionLevelEnum.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/RegionLevelEnum.java
new file mode 100644
index 0000000000..b29c456897
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/RegionLevelEnum.java
@@ -0,0 +1,30 @@
+/**
+ * Copyright (c) 2019 人人开源 All rights reserved.
+ *
+ * https://www.renren.io
+ *
+ * 版权所有,侵权必究!
+ */
+
+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;
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/UserStatusEnum.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/UserStatusEnum.java
new file mode 100644
index 0000000000..dbc043f529
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/enums/UserStatusEnum.java
@@ -0,0 +1,30 @@
+/**
+ * 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;
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java
new file mode 100644
index 0000000000..1af72f3d72
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java
@@ -0,0 +1,35 @@
+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> listOperationPermissions(@RequestBody ListOpePermsFormDTO listOpePermsFormDTO);
+
+ @PostMapping("/lb/get-host")
+ Result getHost();
+}
diff --git a/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java
new file mode 100644
index 0000000000..4dab49c910
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java
@@ -0,0 +1,35 @@
+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.form.InitDefaultOperationsFormDTO;
+import com.epmet.dto.form.ListOpePermsFormDTO;
+import com.epmet.feign.GovAccessFeignClient;
+import org.springframework.stereotype.Component;
+
+import java.util.Set;
+
+/**
+ * @Description
+ * @Author sun
+ */
+@Component
+public class GovAccessFeignClientFallBack implements GovAccessFeignClient {
+
+
+ @Override
+ public Result initDefaultOperationsForRoles(InitDefaultOperationsFormDTO formDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ACCESS_SERVER, "initDefaultOperationsForRoles", formDTO);
+ }
+
+ @Override
+ public Result> listOperationPermissions(ListOpePermsFormDTO listOpePermsFormDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ACCESS_SERVER, "listOperationPermissions", listOpePermsFormDTO);
+ }
+
+ @Override
+ public Result getHost() {
+ return ModuleUtils.feignConError("lb-server", "getHost", null);
+ }
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/Dockerfile b/gov-access-lb/gov-access-lb-server/Dockerfile
new file mode 100644
index 0000000000..a2e8d5d488
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/Dockerfile
@@ -0,0 +1,11 @@
+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"]
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/deploy/docker-compose-dev.yml b/gov-access-lb/gov-access-lb-server/deploy/docker-compose-dev.yml
new file mode 100644
index 0000000000..58de243d08
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/deploy/docker-compose-dev.yml
@@ -0,0 +1,18 @@
+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
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/deploy/docker-compose-prod.yml b/gov-access-lb/gov-access-lb-server/deploy/docker-compose-prod.yml
new file mode 100644
index 0000000000..ababaa4a99
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/deploy/docker-compose-prod.yml
@@ -0,0 +1,18 @@
+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
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/deploy/docker-compose-test.yml b/gov-access-lb/gov-access-lb-server/deploy/docker-compose-test.yml
new file mode 100644
index 0000000000..e28e5d30f0
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/deploy/docker-compose-test.yml
@@ -0,0 +1,18 @@
+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
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/pom.xml b/gov-access-lb/gov-access-lb-server/pom.xml
new file mode 100644
index 0000000000..b5e2005cc3
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/pom.xml
@@ -0,0 +1,137 @@
+
+
+ 0.3.41
+
+ gov-access-lb
+ com.epmet
+ 2.0.0
+
+ 4.0.0
+
+ gov-access-lb-server
+ jar
+
+
+
+ com.epmet
+ gov-access-client
+ 2.0.0
+
+
+ com.epmet
+ gov-org-client
+ 2.0.0
+ compile
+
+
+ com.epmet
+ epmet-user-client
+ 2.0.0
+ compile
+
+
+ com.epmet
+ epmet-commons-tools
+ 2.0.0
+
+
+ com.epmet
+ epmet-commons-mybatis
+ 2.0.0
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework
+ spring-context-support
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ de.codecentric
+ spring-boot-admin-starter-client
+ ${spring.boot.admin.version}
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-discovery
+
+
+ com.alibaba.cloud
+ spring-cloud-starter-alibaba-nacos-config
+
+
+
+ io.github.openfeign
+ feign-httpclient
+ 10.3.0
+
+
+
+
+ ${project.artifactId}
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ true
+
+
+
+ ${project.basedir}/src/main/java
+
+
+ true
+ ${basedir}/src/main/resources
+
+
+
+
+
+
+ dev
+
+ true
+
+
+ 9999
+ dev
+
+
+
+
+
+ epmet_gov_access_user
+ EpmEt-db-UsEr
+
+ 0
+ 192.168.1.130
+ 6379
+ 123456
+
+ true
+ 192.168.1.130:8848
+ 6ceab336-d004-4acf-89c6-e121d06f4988
+
+
+ false
+
+
+
+ false
+
+
+
+
+
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/GovAccessLbApplication.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/GovAccessLbApplication.java
new file mode 100644
index 0000000000..9a3714756e
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/GovAccessLbApplication.java
@@ -0,0 +1,20 @@
+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);
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/aspect/RequestLogAspect.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/aspect/RequestLogAspect.java
new file mode 100644
index 0000000000..49581cf63c
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/aspect/RequestLogAspect.java
@@ -0,0 +1,40 @@
+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();
+ }
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/bean/OpeScopeFilterResultBean.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/bean/OpeScopeFilterResultBean.java
new file mode 100644
index 0000000000..fbe1b38052
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/bean/OpeScopeFilterResultBean.java
@@ -0,0 +1,15 @@
+package com.epmet.bean;
+
+import lombok.Data;
+
+import java.util.HashSet;
+import java.util.Set;
+
+@Data
+public class OpeScopeFilterResultBean {
+
+ private HashSet orgLevelScopes;
+ private Set switchScopes;
+ private boolean allScopes;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/DatabaseProperties.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/DatabaseProperties.java
new file mode 100644
index 0000000000..e9282216d8
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/DatabaseProperties.java
@@ -0,0 +1,15 @@
+//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;
+//
+//}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/DbMigrationConfig.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/DbMigrationConfig.java
new file mode 100644
index 0000000000..b9fcdfb160
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/DbMigrationConfig.java
@@ -0,0 +1,29 @@
+//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();
+// }
+//
+//}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/ModuleConfigImpl.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/ModuleConfigImpl.java
new file mode 100644
index 0000000000..128f1060ef
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/ModuleConfigImpl.java
@@ -0,0 +1,26 @@
+/**
+ * Copyright (c) 2018 人人开源 All rights reserved.
+ *
+ * https://www.renren.io
+ *
+ * 版权所有,侵权必究!
+ */
+
+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";
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/PermissionInitializer.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/PermissionInitializer.java
new file mode 100644
index 0000000000..5196bd2c8c
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/config/PermissionInitializer.java
@@ -0,0 +1,69 @@
+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 existsOpesMap = new HashMap<>();
+ List allExistsOpeEntities = operationService.listAllOperations();
+ allExistsOpeEntities.stream().forEach(ope -> existsOpesMap.put(ope.getOperationKey(), ope));
+
+ ArrayList operations2Create = new ArrayList<>();
+ ArrayList operations2Update = new ArrayList<>();
+
+ // 1.收集需要添加的
+ List 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);
+ }
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/constant/OperationScopeConstant.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/constant/OperationScopeConstant.java
new file mode 100644
index 0000000000..f4aba15fbc
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/constant/OperationScopeConstant.java
@@ -0,0 +1,53 @@
+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";
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/AccessConfigController.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/AccessConfigController.java
new file mode 100644
index 0000000000..76a7886947
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/AccessConfigController.java
@@ -0,0 +1,138 @@
+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 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 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 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 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 scopeKeys = form.getScopeKeys();
+
+ accessConfigService.addOpeAndScopes4Role(roleKey, operationKey, scopeKeys);
+ return new Result();
+ }
+
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/AccessController.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/AccessController.java
new file mode 100644
index 0000000000..dad8f7e095
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/AccessController.java
@@ -0,0 +1,60 @@
+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 hasSpecifiedPermission(@RequestBody HasSpecifiedPermissionFormDTO form) {
+ ValidatorUtils.validateEntity(form);
+ Boolean hasPermission = accessService.hasPermission(form.getOperationKey(), form.getUserId(), form.getApp(), form.getClient());
+ return new Result().ok(hasPermission);
+ }
+
+ /**
+ * 列出功能权限列表
+ * @return
+ */
+ @PostMapping("listoperationpermissions")
+ public Result> listOperationPermissions(@RequestBody ListOpePermsFormDTO listOpePermsFormDTO) {
+ ValidatorUtils.validateEntity(listOpePermsFormDTO);
+ String currAgencyId = listOpePermsFormDTO.getCurrAgencyId();
+ String staffId = listOpePermsFormDTO.getStaffId();
+ Set operationPermissions = accessService.listOperationPermissions(staffId, currAgencyId);
+ return new Result>().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);
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/DemoController.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/DemoController.java
new file mode 100644
index 0000000000..357ea2c9af
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/DemoController.java
@@ -0,0 +1,64 @@
+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;
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovLanguageController.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovLanguageController.java
new file mode 100644
index 0000000000..85e8bce73d
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovLanguageController.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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> page(@RequestParam Map params){
+ PageData page = govLanguageService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ GovLanguageDTO data = govLanguageService.get(id);
+ return new Result().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();
+ }
+
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovMenuController.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovMenuController.java
new file mode 100644
index 0000000000..d3a67c889f
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovMenuController.java
@@ -0,0 +1,156 @@
+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> page(@RequestParam Map params){
+ PageData page = govMenuService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ GovMenuDTO data = govMenuService.get(id);
+
+ //菜单资源列表
+ List resourceList = govResourceService.getMenuResourceList(id);
+
+ return new Result().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 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>
+ */
+ @GetMapping("list")
+ public Result> list(Integer type){
+ List list = govMenuService.getMenuList(type);
+
+ return new Result>().ok(list);
+ }
+
+ /**
+ * 导航
+ * @param tokenDto token
+ * @return List
+ */
+ @GetMapping("nav")
+ public Result> nav(@LoginUser TokenDto tokenDto){
+ List list = govMenuService.getUserMenuNavList(tokenDto);
+ return new Result>().ok(list);
+ }
+
+ /**
+ * 权限标识
+ * @param tokenDto token
+ * @return Set
+ */
+ @GetMapping("permissions")
+ public Result> permissions(@LoginUser TokenDto tokenDto){
+ Set set = govMenuService.getUserPermissions(tokenDto);
+ return new Result>().ok(set);
+ }
+
+ /**
+ * 角色菜单权限
+ * @param tokenDto token
+ * @return
+ */
+ @GetMapping("select")
+ public Result> select(@LoginUser TokenDto tokenDto){
+ List list = govMenuService.getUserMenuList(tokenDto, null);
+
+ return new Result>().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();
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovResourceController.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovResourceController.java
new file mode 100644
index 0000000000..72193db454
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovResourceController.java
@@ -0,0 +1,84 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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> page(@RequestParam Map params){
+ PageData page = govResourceService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ GovResourceDTO data = govResourceService.get(id);
+ return new Result().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();
+ }
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleController.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleController.java
new file mode 100644
index 0000000000..7a1ded893c
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleController.java
@@ -0,0 +1,104 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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> page(@RequestParam Map params){
+ PageData page = govRoleService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ GovRoleDTO data = govRoleService.get(id);
+
+ //查询角色对应的菜单
+ List menuIdList = govRoleMenuService.getMenuIdList(id);
+ data.setMenuIdList(menuIdList);
+
+ return new Result().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(){
+ List data = govRoleService.list(new HashMap<>(1));
+
+ return new Result>().ok(data);
+ }
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleMenuController.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleMenuController.java
new file mode 100644
index 0000000000..8b8a7d8aed
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleMenuController.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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> page(@RequestParam Map params){
+ PageData page = govRoleMenuService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ GovRoleMenuDTO data = govRoleMenuService.get(id);
+ return new Result().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();
+ }
+
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleUserController.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleUserController.java
new file mode 100644
index 0000000000..fcd5733a4d
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/GovRoleUserController.java
@@ -0,0 +1,132 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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> page(@RequestParam Map params){
+ PageData page = govRoleUserService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ public Result get(@PathVariable("id") String id){
+ GovRoleUserDTO data = govRoleUserService.get(id);
+ return new Result().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
+ * @author zhaoqifeng
+ */
+ @GetMapping("getRoleIdList/{id}")
+ public Result>getRoleIdList(@PathVariable("id") String id) {
+ List list = govRoleUserService.getRoleIdList(id);
+ return new Result>().ok(list);
+ }
+
+ /**
+ * 保存更新权限
+ * @param userId 用户id
+ * @param roleIdList 权限列表
+ * @author zhaoqifeng
+ */
+ @PostMapping("saveOrUpdateRole")
+ public Result saveOrUpdate(@RequestParam("userId") String userId, @RequestBody List 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();
+ }
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/RoleController.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/RoleController.java
new file mode 100644
index 0000000000..5b7c01e23e
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/RoleController.java
@@ -0,0 +1,41 @@
+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> listOperationsByRoleId(@PathVariable("roleId") String roleId) {
+ List roleOperationResultDTOS = roleOperationService.listOperationsByRoleId(roleId);
+ return new Result>().ok(roleOperationResultDTOS);
+ }
+
+ /**
+ * 批量为角色ID初始化操作权限列表
+ * @param formDTO
+ * @return
+ */
+ @PostMapping("initdefaultoperationsforroles")
+ public Result initDefaultOperationsForRoles(@RequestBody InitDefaultOperationsFormDTO formDTO) {
+ List roles = formDTO.getRoles();
+ roleOperationService.initDefaultOperationsForRoles(roles);
+ return new Result();
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/TestController.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/TestController.java
new file mode 100644
index 0000000000..b8ab2dbda6
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/controller/TestController.java
@@ -0,0 +1,25 @@
+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();
+ }
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovLanguageDao.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovLanguageDao.java
new file mode 100644
index 0000000000..acd505c019
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovLanguageDao.java
@@ -0,0 +1,28 @@
+/**
+ * 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 getLanguage(GovLanguageEntity entity);
+
+ void updateLanguage(GovLanguageEntity entity);
+
+ void insertOperLanguageEntity(GovLanguageEntity entity);
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovMenuDao.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovMenuDao.java
new file mode 100644
index 0000000000..1e36bff758
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovMenuDao.java
@@ -0,0 +1,52 @@
+/**
+ * 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 getById(@Param("id") String id, @Param("language") String language);
+
+ /**
+ * 查询所有菜单列表
+ *
+ * @param type 菜单类型
+ * @param language 语言
+ */
+ List getMenuList(@Param("type") Integer type, @Param("language") String language);
+
+ /**
+ * 查询用户菜单列表
+ *
+ * @param userId 用户ID
+ * @param type 菜单类型
+ * @param language 语言
+ */
+ List getUserMenuList(@Param("userId") String userId, @Param("type") Integer type, @Param("language") String language);
+
+
+ /**
+ * 根据父菜单,查询子菜单
+ * @param pid 父菜单ID
+ */
+ List getListPid(String pid);
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovResourceDao.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovResourceDao.java
new file mode 100644
index 0000000000..4970d56e9c
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovResourceDao.java
@@ -0,0 +1,48 @@
+/**
+ * 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 {
+ /**
+ * 根据资源编码,删除对应的资源
+ * @param code 资源编码
+ */
+ void deleteByCode(String code);
+
+ /**
+ * 获取资源列表
+ * @param menuId 菜单ID
+ */
+ List getMenuResourceList(String menuId);
+
+ /**
+ * 获取所有资源列表
+ */
+ List getResourceList();
+
+ /**
+ * 获取用户资源列表
+ * @param userId 用户ID
+ */
+ List getUserResourceList(@Param("userId") String userId);
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleDao.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleDao.java
new file mode 100644
index 0000000000..768fc42792
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleDao.java
@@ -0,0 +1,24 @@
+/**
+ * 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 {
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleMenuDao.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleMenuDao.java
new file mode 100644
index 0000000000..dc0559acb3
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleMenuDao.java
@@ -0,0 +1,49 @@
+/**
+ * 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 {
+
+ /**
+ * 根据角色ID,获取菜单ID列表
+ */
+ List 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);
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleUserDao.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleUserDao.java
new file mode 100644
index 0000000000..bf400e0584
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/GovRoleUserDao.java
@@ -0,0 +1,57 @@
+/**
+ * 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 {
+
+ /**
+ * 根据角色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 getRoleIdList(String userId);
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationDao.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationDao.java
new file mode 100644
index 0000000000..6b34908dde
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationDao.java
@@ -0,0 +1,38 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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 {
+
+ List listAllOperationEntities();
+
+ List listAllValidOperationEntities();
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationScopeDao.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationScopeDao.java
new file mode 100644
index 0000000000..98a455f052
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationScopeDao.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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 {
+
+ /**
+ * 查询角色的操作key对应操作范围列表
+ * @param roleId 角色id
+ * @param operationKey 操作key
+ * @return
+ */
+ Set listOperationScopesByRoleId(@Param("roleId") String roleId,
+ @Param("operationKey") String operationKey);
+
+ /**
+ * 查询角色所有operation及其范围
+ * @param roleId
+ */
+ List listAllRoleOperationScopesByRoleId(String roleId);
+
+ String getDefaultScopeKeyForOperation(@Param("operationKey") String operationKey);
+
+ String getScopeIndexByScopeKey(@Param("scopeKey") String scopeKey);
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationScopeDefaultDao.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationScopeDefaultDao.java
new file mode 100755
index 0000000000..2c9a049e83
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/OperationScopeDefaultDao.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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 {
+ List listAllValid();
+
+ /**
+ * 根据角色key和操作key查询默认操作权限列表
+ * @param roleKey
+ * @return
+ */
+ List listDefaultOpeScopes(@Param("roleKey") String roleKey);
+
+ /**
+ * 查询操作的默认范围
+ * @param roleKey
+ * @param operationKey
+ * @return
+ */
+ List listOpeDefaultScopes4Config(
+ @Param("roleKey") String roleKey,
+ @Param("operationKey") String operationKey);
+
+ List listOpeDefaultScopesByRoleAndOpeKey(
+ @Param("roleKey") String roleKey,
+ @Param("operationKey") String operationKey);
+
+ int delete(
+ @Param("roleKey") String roleKey,
+ @Param("operationKey") String operationKey,
+ @Param("scopeKey") String scopeKey);
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleOperationDao.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleOperationDao.java
new file mode 100644
index 0000000000..46a159e3b6
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleOperationDao.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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 {
+
+ List listOperationsByRoleId(@Param("roleId") String roleId);
+
+ List 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);
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleOperationDefaultDao.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleOperationDefaultDao.java
new file mode 100755
index 0000000000..19ccbf901e
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleOperationDefaultDao.java
@@ -0,0 +1,57 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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 {
+
+ /**
+ * 查询可用
+ * @return
+ */
+ List listAllValid();
+
+ /**
+ * 查询某个roleKey的所有默认操作权限
+ * @param roleKey
+ * @return
+ */
+ List listByRoleKey(@Param("roleKey") String roleKey);
+
+ List listRoleDefaultOpsByRoleKey(@Param("roleKey") String roleKey);
+
+ int deleteByRoleKeyAndOpeKey(
+ @Param("roleKey") String roleKey,
+ @Param("operationKey") String operationKey);
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleScopeDao.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleScopeDao.java
new file mode 100644
index 0000000000..3199a78e3d
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/dao/RoleScopeDao.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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 {
+
+ /**
+ * 权限配置:列出可选项
+ * @param roleId
+ * @param operationKey
+ * @return
+ */
+ List listScopeOptionsForAccessConfig(@Param("roleId") String roleId, @Param("operationKey") String operationKey);
+
+ /**
+ *
+ * @param roleId
+ * @param operationKey
+ * @return
+ */
+ List 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 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);
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovLanguageEntity.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovLanguageEntity.java
new file mode 100644
index 0000000000..ee84f846d9
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovLanguageEntity.java
@@ -0,0 +1,49 @@
+/**
+ * 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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovMenuEntity.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovMenuEntity.java
new file mode 100644
index 0000000000..fcb8a5fa38
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovMenuEntity.java
@@ -0,0 +1,69 @@
+/**
+ * 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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovResourceEntity.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovResourceEntity.java
new file mode 100644
index 0000000000..1d5d716c22
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovResourceEntity.java
@@ -0,0 +1,53 @@
+/**
+ * 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;
+ /**
+ * 请求方式(如:GET、POST、PUT、DELETE)
+ */
+ private String resourceMethod;
+ /**
+ * 菜单标识 0:非菜单资源 1:菜单资源
+ */
+ private Integer menuFlag;
+ /**
+ * 认证等级 0:权限认证 1:登录认证 2:无需认证
+ */
+ private Integer authLevel;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleEntity.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleEntity.java
new file mode 100644
index 0000000000..4bc4575836
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleEntity.java
@@ -0,0 +1,44 @@
+/**
+ * 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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleMenuEntity.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleMenuEntity.java
new file mode 100644
index 0000000000..6ea4d1f2a5
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleMenuEntity.java
@@ -0,0 +1,36 @@
+/**
+ * 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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleUserEntity.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleUserEntity.java
new file mode 100644
index 0000000000..599ca7f3e2
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/GovRoleUserEntity.java
@@ -0,0 +1,37 @@
+/**
+ * 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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationEntity.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationEntity.java
new file mode 100644
index 0000000000..e599d8c28f
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationEntity.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationScopeDefaultEntity.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationScopeDefaultEntity.java
new file mode 100755
index 0000000000..6ec89eb12b
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationScopeDefaultEntity.java
@@ -0,0 +1,53 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationScopeEntity.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationScopeEntity.java
new file mode 100644
index 0000000000..2c7223d97d
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/OperationScopeEntity.java
@@ -0,0 +1,55 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleOperationDefaultEntity.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleOperationDefaultEntity.java
new file mode 100755
index 0000000000..8ea82b13b9
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleOperationDefaultEntity.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleOperationEntity.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleOperationEntity.java
new file mode 100644
index 0000000000..96f70de1be
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleOperationEntity.java
@@ -0,0 +1,51 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleScopeEntity.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleScopeEntity.java
new file mode 100644
index 0000000000..2c3c6f21dc
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/entity/RoleScopeEntity.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/excel/RoleOperationExcel.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/excel/RoleOperationExcel.java
new file mode 100644
index 0000000000..4b0c4ee373
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/excel/RoleOperationExcel.java
@@ -0,0 +1,62 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java
new file mode 100644
index 0000000000..d88b8358a3
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/EpmetUserFeignClient.java
@@ -0,0 +1,77 @@
+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 getLatestCustomer(@PathVariable("userId") String userId);
+
+ /**
+ * @Description 查询工作人员上次登录的网格
+ * @Param customerId ; staffId
+ * @return Result
+ * @Author wangc
+ * @Date 2020.04.23 10:44
+ **/
+ @PostMapping(value = "/epmetuser/staffgridvisited/getstafflatestgrid")
+ Result 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> getRolesOfStaff(StaffRoleFormDTO staffRoleFormDTO);
+
+ /**
+ *
+ * 根据id查询运营人员详情
+ *
+ * @param operUserId oper_user表主键
+ * @return com.epmet.commons.tools.utils.Result>
+ * @author zhaoqifeng
+ * @date 2020/3/19 09:28
+ **/
+ @GetMapping("/operuser/queryOperUserDtoById/{operUserId}")
+ Result info(@PathVariable("operUserId") String operUserId);
+}
+
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java
new file mode 100644
index 0000000000..c9f2e3eada
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/GovOrgFeignClient.java
@@ -0,0 +1,34 @@
+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 getAgencyById(@PathVariable("agencyId") String agencyId);
+
+ /**
+ * 根据staffId查询所属的组织机构
+ * @param staffId
+ * @return
+ */
+ @PostMapping("/gov/org/agency/agencybystaff/{staffId}")
+ Result getAgencyByStaff(@PathVariable("staffId") String staffId);
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java
new file mode 100644
index 0000000000..cd39c87452
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/fallback/EpmetUserFeignClientFallback.java
@@ -0,0 +1,49 @@
+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 getLatestCustomer(String userId) {
+ return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getLatestCustomer", userId);
+ }
+
+ @Override
+ public Result> getRolesOfStaff(StaffRoleFormDTO staffRoleFormDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "getRolesOfStaff");
+ }
+
+ @Override
+ public Result info(String operUserId) {
+ return ModuleUtils.feignConError(ServiceConstant.EPMET_USER_SERVER, "info", operUserId);
+ }
+
+ @Override
+ public Result 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);
+ }
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java
new file mode 100644
index 0000000000..f418de95e0
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/feign/fallback/GovOrgFeignClientFallBack.java
@@ -0,0 +1,31 @@
+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 getAgencyById(String agencyId) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyById", agencyId);
+ }
+
+ @Override
+ public Result getAgencyByStaff(String staffId) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getAgencyByStaff", staffId);
+ }
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovLanguageRedis.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovLanguageRedis.java
new file mode 100644
index 0000000000..8f9595582b
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovLanguageRedis.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+ }
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovMenuRedis.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovMenuRedis.java
new file mode 100644
index 0000000000..361d6c3014
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovMenuRedis.java
@@ -0,0 +1,74 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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 menuList){
+ String key = RedisKeys.getUserMenuNavKey(userId, app, client, HttpContextUtils.getLanguage());
+ redisUtils.set(key, menuList);
+ }
+
+ public List getUserMenuNavList(String userId, String app, String client){
+ String key = RedisKeys.getUserMenuNavKey(userId, app, client, HttpContextUtils.getLanguage());
+ return (List)redisUtils.get(key);
+ }
+
+ public void setUserPermissions(String userId, String app, String client, Set permsSet){
+ String key = RedisKeys.getUserPermissionsKey(userId, app, client);
+ redisUtils.set(key, permsSet);
+ }
+
+ public Set getUserPermissions(String userId, String app, String client){
+ String key = RedisKeys.getUserPermissionsKey(userId, app, client);
+ return (Set)redisUtils.get(key);
+ }
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovResourceRedis.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovResourceRedis.java
new file mode 100644
index 0000000000..e21bd5095c
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovResourceRedis.java
@@ -0,0 +1,50 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+ }
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleMenuRedis.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleMenuRedis.java
new file mode 100644
index 0000000000..c778d22c7d
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleMenuRedis.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+ }
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleRedis.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleRedis.java
new file mode 100644
index 0000000000..3e87e447dd
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleRedis.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+ }
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleUserRedis.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleUserRedis.java
new file mode 100644
index 0000000000..7a7aad6c8c
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/GovRoleUserRedis.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+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;
+ }
+
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/RoleOpeScopeRedis.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/RoleOpeScopeRedis.java
new file mode 100644
index 0000000000..af82f0f8b5
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/redis/RoleOpeScopeRedis.java
@@ -0,0 +1,74 @@
+package com.epmet.redis;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.TypeReference;
+import com.epmet.commons.tools.redis.RedisKeys;
+import com.epmet.commons.tools.redis.RedisUtils;
+import com.epmet.dto.result.RoleOpeScopeResultDTO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * 角色的操作权限对应的操作范围Redis
+ */
+@Component
+public class RoleOpeScopeRedis {
+
+ @Autowired
+ private RedisUtils redisUtils;
+
+ /**
+ * 缓存角色操作范围
+ * @param roleId
+ * @param opeKey
+ * @param scopes
+ */
+ public void setRoleOpeScopes(String roleId, String opeKey, Set scopes) {
+ String roleOpeScopesKey = RedisKeys.getRoleOpeScopesKey(roleId, opeKey);
+ redisUtils.set(roleOpeScopesKey, scopes);
+ }
+
+ /**
+ * 缓存角色所有的操作范围
+ * @param roleId
+ * @param scopes
+ */
+ public void setRoleAllOpeScopes(String roleId, List scopes) {
+ String roleAllOpeScopesKey = RedisKeys.getRoleAllOpeScopesKey(roleId);
+ redisUtils.setString(roleAllOpeScopesKey, JSON.toJSONString(scopes));
+ }
+
+ /**
+ * 查询角色操作范围
+ * @param roleId
+ * @param opeKey
+ * @return
+ */
+ public Set getRoleOpeScopes(String roleId, String opeKey) {
+ String roleOpeScopesKey = RedisKeys.getRoleOpeScopesKey(roleId, opeKey);
+ return (Set)redisUtils.get(roleOpeScopesKey);
+ }
+
+ /**
+ * 查询角色所有操作范围
+ * @param roleId
+ * @return
+ */
+ public List getRoleAllOpeScopes(String roleId) {
+ String roleOpeScopesKey = RedisKeys.getRoleAllOpeScopesKey(roleId);
+ String stringValue = redisUtils.getString(roleOpeScopesKey);
+ return JSON.parseObject(stringValue, new TypeReference>(){});
+ }
+
+ /**
+ * 删除缓存
+ * @param roleId
+ */
+ public void delRoleAllOpeScopes(String roleId) {
+ redisUtils.delete(RedisKeys.getRoleAllOpeScopesKey(roleId));
+ }
+
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/AccessConfigService.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/AccessConfigService.java
new file mode 100644
index 0000000000..508f3ad45f
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/AccessConfigService.java
@@ -0,0 +1,30 @@
+package com.epmet.service;
+
+import com.epmet.dto.form.AccessConfigRoleDefaultOpesFormDTO;
+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 java.util.List;
+import java.util.Set;
+
+public interface AccessConfigService {
+ List listOpesByRole(String roleId);
+
+ void saveRoleOpes(String roleId, List opes);
+
+ AccessConfigOptionsResultDTO listScopeOptionsForAccessConfig(String roleId, String operationKey);
+
+ void saveConfig(String roleId, String operationKey, Set scopeKeys);
+
+ List listRoleDefaultOpsByRoleKey(String roleKey);
+
+ void saveRoleDefaultOperations(String roleKey, List operationKeys);
+
+ List listOpeDefaultScopes4Role(String roleKey, String operationKey);
+
+ void saveOpeDefaultScopes(String roleKey, String operationKey, List scopeKeys);
+
+ void addOpeAndScopes4Role(String roleKey, String operationKey, List scopeKeys);
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/AccessService.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/AccessService.java
new file mode 100644
index 0000000000..7b365fa21b
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/AccessService.java
@@ -0,0 +1,44 @@
+package com.epmet.service;
+
+import com.epmet.dto.form.GetSQLFilterFormDTO;
+import com.epmet.dto.result.LoginUserDetailsResultDTO;
+import com.epmet.dto.result.RoleOpeScopeResultDTO;
+
+import java.util.List;
+import java.util.Set;
+
+public interface AccessService {
+
+ /**
+ * 查询登陆用户登陆信息
+ * @return
+ */
+ LoginUserDetailsResultDTO getLoginUserDetails(String app, String client, String staffId);
+
+ /**
+ * 查询角色所有operation及其范围(缓存)
+ * @param roleId
+ * @return
+ */
+ List listAllRoleOperationScopesByRoleId(String roleId);
+
+ /**
+ * 角色
+ * @param operationKey
+ * @param userId
+ * @return
+ */
+ Boolean hasPermission(String operationKey, String userId, String app, String client);
+
+ /**
+ * 生成sql过滤脚本
+ * @param form
+ */
+ String getSqlFilterSegment(GetSQLFilterFormDTO form);
+
+ /**
+ * 列出角色的功能权限
+ * @return
+ */
+ Set listOperationPermissions(String staffId, String currAgencyId);
+}
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovLanguageService.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovLanguageService.java
new file mode 100644
index 0000000000..1f4a5e65e3
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovLanguageService.java
@@ -0,0 +1,105 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.GovLanguageDTO;
+import com.epmet.entity.GovLanguageEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 国际化
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-03-18
+ */
+public interface GovLanguageService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-03-18
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-03-18
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return GovLanguageDTO
+ * @author generator
+ * @date 2020-03-18
+ */
+ GovLanguageDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void save(GovLanguageDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void update(GovLanguageDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void delete(String[] ids);
+
+ /**
+ * 保存或更新
+ * @param tableName 表名
+ * @param tableId 表主键
+ * @param fieldName 字段名
+ * @param fieldValue 字段值
+ * @param language 语言
+ */
+ void saveOrUpdate(String tableName, String tableId, String fieldName, String fieldValue, String language);
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovMenuService.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovMenuService.java
new file mode 100644
index 0000000000..b5c0cf12a3
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovMenuService.java
@@ -0,0 +1,144 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.dto.GovMenuDTO;
+import com.epmet.entity.GovMenuEntity;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * 菜单管理
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-03-18
+ */
+public interface GovMenuService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-03-18
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-03-18
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return GovMenuDTO
+ * @author generator
+ * @date 2020-03-18
+ */
+ GovMenuDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void save(GovMenuDTO dto, TokenDto tokenDto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void update(GovMenuDTO dto, TokenDto tokenDto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void delete(String[] ids);
+
+ /**
+ * 删除
+ *
+ * @param id id
+ * @author generator
+ * @date 2020-03-18
+ */
+ void delete(String id, TokenDto tokenDto);
+
+ /**
+ * 用户菜单列表
+ *
+ * @param tokenDto 用户信息
+ * @param type 菜单类型
+ * @return java.util.List
+ */
+ List getUserMenuList(TokenDto tokenDto, Integer type);
+
+ /**
+ * 菜单列表
+ *
+ * @param type 菜单类型
+ */
+ List getMenuList(Integer type);
+
+ /**
+ * 用户菜单导航
+ * @param tokenDto 用户信息
+ * @return java.util.List
+ */
+ List getUserMenuNavList(TokenDto tokenDto);
+
+ /**
+ * 获取用户权限标识
+ * @param tokenDto 用户信息
+ * @return java.util.Set
+ */
+ Set getUserPermissions(TokenDto tokenDto);
+
+ /**
+ * 根据父菜单,查询子菜单
+ * @param pid 父菜单ID
+ */
+ List getListPid(String pid);
+
+ void clearOperUserAccess(String app, String client, String userId);
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovResourceService.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovResourceService.java
new file mode 100644
index 0000000000..8b6b8f5e6d
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovResourceService.java
@@ -0,0 +1,110 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.GovResourceDTO;
+import com.epmet.dto.result.MenuResourceDTO;
+import com.epmet.entity.GovResourceEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 资源管理
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-03-18
+ */
+public interface GovResourceService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-03-18
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-03-18
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return GovResourceDTO
+ * @author generator
+ * @date 2020-03-18
+ */
+ GovResourceDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void save(GovResourceDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void update(GovResourceDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void delete(String[] ids);
+
+ /**
+ * 保存菜单资源
+ * @param menuId 菜单ID
+ * @param menuName 菜单名称
+ * @param resourceList 资源列表
+ */
+ void saveMenuResource(String menuId, String menuName, List resourceList);
+
+ /**
+ * 获取菜单资源列表
+ * @param menuId 菜单ID
+ */
+ List getMenuResourceList(String menuId);
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovRoleMenuService.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovRoleMenuService.java
new file mode 100644
index 0000000000..7b0d2af34a
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovRoleMenuService.java
@@ -0,0 +1,125 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.GovRoleMenuDTO;
+import com.epmet.entity.GovRoleMenuEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 角色菜单关系
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-03-18
+ */
+public interface GovRoleMenuService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-03-18
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-03-18
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return GovRoleMenuDTO
+ * @author generator
+ * @date 2020-03-18
+ */
+ GovRoleMenuDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void save(GovRoleMenuDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void update(GovRoleMenuDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void delete(String[] ids);
+
+ /**
+ * 根据角色ID,获取菜单ID列表
+ */
+ List getMenuIdList(String roleId);
+
+ /**
+ * 保存或修改
+ * @param roleId 角色ID
+ * @param menuIdList 菜单ID列表
+ */
+ void saveOrUpdate(String roleId, List menuIdList);
+
+ /**
+ * 根据角色id,删除角色菜单关系
+ * @param roleId 角色id
+ */
+ void deleteByRoleId(String roleId);
+
+ /**
+ * 根据角色ids,删除角色菜单关系
+ * @param roleIds
+ */
+ void deleteByRoleIds(String[] roleIds);
+
+ /**
+ * 根据菜单id,删除角色菜单关系
+ * @param menuId 菜单id
+ */
+ void deleteByMenuId(String menuId);
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovRoleService.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovRoleService.java
new file mode 100644
index 0000000000..4fbf7e0f58
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovRoleService.java
@@ -0,0 +1,95 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.GovRoleDTO;
+import com.epmet.entity.GovRoleEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 角色管理
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-03-18
+ */
+public interface GovRoleService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-03-18
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-03-18
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return GovRoleDTO
+ * @author generator
+ * @date 2020-03-18
+ */
+ GovRoleDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void save(GovRoleDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void update(GovRoleDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2020-03-18
+ */
+ void delete(String[] ids);
+}
\ No newline at end of file
diff --git a/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovRoleUserService.java b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovRoleUserService.java
new file mode 100644
index 0000000000..ff67c7d239
--- /dev/null
+++ b/gov-access-lb/gov-access-lb-server/src/main/java/com/epmet/service/GovRoleUserService.java
@@ -0,0 +1,133 @@
+/**
+ * Copyright 2018 人人开源 https://www.renren.io
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.GovRoleUserDTO;
+import com.epmet.entity.GovRoleUserEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 角色用户关系
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-03-18
+ */
+public interface GovRoleUserService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2020-03-18
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2020-03-18
+ */
+ List list(Map