+ * 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.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * 角色管理
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2020-03-18
+ */
+@Data
+public class GovRoleListDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户id
+ */
+ private String customerId;
+
+ /**
+ * 角色名称
+ */
+ private String name;
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java
index 36ccf542bb..d5b6623ea8 100644
--- a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java
+++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java
@@ -2,10 +2,8 @@ package com.epmet.feign;
import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.utils.Result;
-import com.epmet.dto.form.GetStaffExistRoleFormDTO;
-import com.epmet.dto.form.InitDefaultOperationsFormDTO;
-import com.epmet.dto.form.ListOpePermsFormDTO;
-import com.epmet.dto.form.RoleUserFormDTO;
+import com.epmet.dto.GovRoleDTO;
+import com.epmet.dto.form.*;
import com.epmet.dto.result.NewUserRoleResultDTO;
import com.epmet.feign.fallback.GovAccessFeignClientFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
@@ -52,4 +50,7 @@ public interface GovAccessFeignClient {
@PostMapping("/gov/access/govroleuser/getStaffExistRole")
Result> getStaffExistRole(@RequestBody GetStaffExistRoleFormDTO formDTO);
+ @PostMapping("/gov/access/govrole/getgovrole")
+ Result getGovRole(@RequestBody GovRoleListDTO formDTO);
+
}
diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java
index bfb9acbc3b..9fb58edf69 100644
--- a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java
+++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java
@@ -3,10 +3,8 @@ 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.GetStaffExistRoleFormDTO;
-import com.epmet.dto.form.InitDefaultOperationsFormDTO;
-import com.epmet.dto.form.ListOpePermsFormDTO;
-import com.epmet.dto.form.RoleUserFormDTO;
+import com.epmet.dto.GovRoleDTO;
+import com.epmet.dto.form.*;
import com.epmet.dto.result.NewUserRoleResultDTO;
import com.epmet.feign.GovAccessFeignClient;
@@ -40,4 +38,9 @@ public class GovAccessFeignClientFallBack implements GovAccessFeignClient {
public Result> getStaffExistRole(GetStaffExistRoleFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ACCESS_SERVER, "getStaffExistRole", formDTO);
}
+
+ @Override
+ public Result getGovRole(GovRoleListDTO formDTO) {
+ return ModuleUtils.feignConError(ServiceConstant.GOV_ACCESS_SERVER, "getGovRole", formDTO);
+ }
}
diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleController.java
index c11faba160..0159a8d891 100644
--- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleController.java
+++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleController.java
@@ -27,6 +27,7 @@ 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.dto.form.GovRoleListDTO;
import com.epmet.service.GovRoleMenuService;
import com.epmet.service.GovRoleService;
import org.springframework.beans.factory.annotation.Autowired;
@@ -102,4 +103,9 @@ public class GovRoleController {
return new Result>().ok(data);
}
+ @PostMapping("getgovrole")
+ public Result getGovRole(@RequestBody GovRoleListDTO fromDTO){
+ return new Result().ok(govRoleService.getGovRole(fromDTO));
+ }
+
}
diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleDao.java
index 526dbf9b37..a70c839a63 100644
--- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleDao.java
+++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleDao.java
@@ -9,6 +9,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.GovRoleDTO;
import com.epmet.dto.result.NewUserRoleResultDTO;
import com.epmet.entity.GovRoleEntity;
import org.apache.ibatis.annotations.Mapper;
@@ -33,4 +34,5 @@ public interface GovRoleDao extends BaseDao {
*/
List getCustomerRoles(@Param("customerId")String customerId);
+ GovRoleDTO selectGovRole(@Param("customerId") String customerId, @Param("name") String name);
}
diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleService.java
index 4fbf7e0f58..b7ca62a420 100644
--- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleService.java
+++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleService.java
@@ -20,6 +20,7 @@ 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.dto.form.GovRoleListDTO;
import com.epmet.entity.GovRoleEntity;
import java.util.List;
@@ -92,4 +93,6 @@ public interface GovRoleService extends BaseService {
* @date 2020-03-18
*/
void delete(String[] ids);
+
+ GovRoleDTO getGovRole(GovRoleListDTO fromDTO);
}
\ No newline at end of file
diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleServiceImpl.java
index 72a542c9e7..c171d081d9 100644
--- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleServiceImpl.java
+++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleServiceImpl.java
@@ -28,6 +28,7 @@ import com.epmet.commons.tools.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.GovRoleDao;
import com.epmet.dto.GovRoleDTO;
+import com.epmet.dto.form.GovRoleListDTO;
import com.epmet.entity.GovRoleEntity;
import com.epmet.redis.GovRoleRedis;
import com.epmet.service.GovRoleMenuService;
@@ -122,4 +123,9 @@ public class GovRoleServiceImpl extends BaseServiceImpl
+
+
+