|
|
@@ -31,6 +31,7 @@ import com.sckw.system.model.vo.req.*;
|
|
|
import com.sckw.system.model.vo.res.*;
|
|
|
import com.sckw.system.util.MenuEntTypeForUsingRolesUtil;
|
|
|
import com.sckw.transport.api.dubbo.TransportRemoteService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.dubbo.config.annotation.DubboReference;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
@@ -48,6 +49,7 @@ import java.util.stream.Collectors;
|
|
|
* @author zk
|
|
|
* @date 2023-05-31
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class KwsMenuService {
|
|
|
|
|
|
@@ -633,7 +635,8 @@ public class KwsMenuService {
|
|
|
extracted(reqVo.getUserId(), reqVo.getClientType(), findMenuTreePojo);
|
|
|
List<KwsMenuResVo> menuList = new ArrayList<>();
|
|
|
if (Objects.equals(LoginUserHolder.getSystemType(), SystemTypeEnum.COMPANY.getCode()) && org.apache.commons.lang3.StringUtils.equals(reqVo.getClientType(), String.valueOf(Global.NUMERICAL_THREE))) {
|
|
|
- menuList = kwsMenuDao.findList1(findMenuTreePojo);
|
|
|
+ // menuList = kwsMenuDao.findList1(findMenuTreePojo);
|
|
|
+ menuList = kwsMenuDao.findList2(findMenuTreePojo);
|
|
|
}else {
|
|
|
menuList = kwsMenuDao.findList(findMenuTreePojo);
|
|
|
}
|
|
|
@@ -698,11 +701,13 @@ public class KwsMenuService {
|
|
|
findMenuTreePojo.setIsMain(LoginUserHolder.getIsMain());
|
|
|
//运营端的管理员不做过滤
|
|
|
if (Objects.equals(LoginUserHolder.getSystemType(), SystemTypeEnum.MANAGE.getCode()) && Objects.equals(LoginUserHolder.getIsMain(), Global.YES)) {
|
|
|
+ log.info("运营端管理员管理员,不做过滤");
|
|
|
return;
|
|
|
}
|
|
|
//pc端和app权限不做过滤,
|
|
|
// 根据用户id查询角色id
|
|
|
if (Objects.equals(LoginUserHolder.getSystemType(), SystemTypeEnum.COMPANY.getCode()) && org.apache.commons.lang3.StringUtils.equals(clientType, String.valueOf(Global.NUMERICAL_THREE)) && Objects.equals(LoginUserHolder.getIsMain(), Global.YES)) {
|
|
|
+ log.info("企业端管理员管理员,不做过滤");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -716,6 +721,7 @@ public class KwsMenuService {
|
|
|
}
|
|
|
//改为单一角色切换形式,获取当前激活的角色。
|
|
|
findMenuTreePojo.setRoleIds(Collections.singletonList(LoginUserHolder.getCurrentRoleId()));
|
|
|
+ log.info("企业端管理员,返回所有菜单");
|
|
|
return;
|
|
|
}
|
|
|
//特殊处理,后面会做菜单关联
|
|
|
@@ -725,6 +731,7 @@ public class KwsMenuService {
|
|
|
List<KwsEntType> listByEntId = kwsEntTypeDao.findListByEntId(entId);
|
|
|
findMenuTreePojo.setEntTypeList(listByEntId.stream().map(KwsEntType::getType).map(String::valueOf).toList());
|
|
|
findMenuTreePojo.setEntId(LoginUserHolder.getEntId());
|
|
|
+ log.info("普通用户,返回所有菜单");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -736,6 +743,7 @@ public class KwsMenuService {
|
|
|
throw new SystemException(HttpStatus.QUERY_FAIL_CODE, HttpStatus.ACCOUNT_NOT_EXISTS);
|
|
|
}
|
|
|
//改为单一角色切换形式,获取当前激活的角色。
|
|
|
+ log.info("设置单一用户,返回所有菜单");
|
|
|
findMenuTreePojo.setRoleIds(Collections.singletonList(LoginUserHolder.getCurrentRoleId()));
|
|
|
}
|
|
|
|