|
|
@@ -135,6 +135,19 @@ public class KwsRoleService {
|
|
|
if (StringUtils.isBlank(deptIds)) {
|
|
|
return idResVo;
|
|
|
}
|
|
|
+
|
|
|
+ saveAuthority(roleId, deptIds);
|
|
|
+
|
|
|
+ return idResVo;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param roleId 角色id deptIds能访问的机构数据id
|
|
|
+ * @desc: 存数据权限
|
|
|
+ * @author: czh
|
|
|
+ * @date: 2023/8/16
|
|
|
+ */
|
|
|
+ private void saveAuthority(Long roleId, String deptIds) {
|
|
|
String[] deptIdArr = deptIds.split(",");
|
|
|
List<KwsAuthority> kwsAuthorities = new ArrayList<>();
|
|
|
Long userId = LoginUserHolder.getUserId();
|
|
|
@@ -155,8 +168,6 @@ public class KwsRoleService {
|
|
|
if (kwsAuthorityDao.saveBatch(kwsAuthorities) != kwsAuthorities.size()) {
|
|
|
throw new SystemException(HttpStatus.CRUD_FAIL_CODE, HttpStatus.INSERT_FAIL);
|
|
|
}
|
|
|
-
|
|
|
- return idResVo;
|
|
|
}
|
|
|
|
|
|
/**
|