权限修改

jg-waiwang-pro
huchuanhu 6 months ago
parent 7eba8e5261
commit cf9a4a0424

@ -65,8 +65,11 @@ public class MybatisPlusMetaObjectHandler implements MetaObjectHandler {
}else{ }else{
companyId = organizeEntity.getId(); companyId = organizeEntity.getId();
} }
organizeEntity = organizeService.getInfo(organizeEntity.getParentId());
if(organizeEntity != null){
organizeIdList.add(organizeEntity.getId());
}
} }
organizeIdList.add("96240625-934F-490B-8AA6-0BC775B18468");
Collections.reverse(organizeIdList); Collections.reverse(organizeIdList);
String organizeId = JSON.toJSONString(organizeIdList); String organizeId = JSON.toJSONString(organizeIdList);
// 可以在这里填充编码查询到编码规则自动填充 // 可以在这里填充编码查询到编码规则自动填充

@ -2,6 +2,7 @@ package jnpf.permission.service.impl;
import cn.hutool.core.text.StrPool; import cn.hutool.core.text.StrPool;
import com.alibaba.fastjson.JSON;
import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.dynamic.datasource.annotation.DSTransactional; import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@ -40,6 +41,7 @@ import jnpf.permission.service.*;
import jnpf.util.*; import jnpf.util.*;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -716,7 +718,9 @@ public class AuthorizeServiceImpl extends SuperServiceImpl<AuthorizeMapper, Auth
add(userInfo.getOrganizeId()); add(userInfo.getOrganizeId());
}}); }});
if(CollectionUtils.isNotEmpty(orgAllPathList)){ if(CollectionUtils.isNotEmpty(orgAllPathList)){
itemValue = String.join(",", orgAllPathList.get(0)); itemValue = JSON.toJSONString(orgAllPathList.get(0));
itemValue = itemValue.substring(1);
itemValue = itemValue.substring(0, itemValue.length() -1);//去掉[]
}else{ }else{
itemValue = ""; itemValue = "";
} }
@ -790,6 +794,7 @@ public class AuthorizeServiceImpl extends SuperServiceImpl<AuthorizeMapper, Auth
* @param allIdList id * @param allIdList id
* @return * @return
*/ */
@NotNull
private List<List<String>> getOrgAllPathList(List<String> allIdList) { private List<List<String>> getOrgAllPathList(List<String> allIdList) {
List<List<String>> resOrg=new ArrayList<>(); List<List<String>> resOrg=new ArrayList<>();
for(String itemOrg: allIdList){ for(String itemOrg: allIdList){

Loading…
Cancel
Save