Browse Source

#用户菜单鉴权修改

zhongwei
yang_shj 7 months ago
parent
commit
71d1e85dc2
  1. 5
      hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java

5
hzims-service/hzims-big-model/src/main/java/com/hnac/hzims/bigmodel/interactive/service/impl/InteractiveServiceImpl.java

@ -204,11 +204,8 @@ public class InteractiveServiceImpl implements IInteractiveService {
}); });
} }
// 菜单鉴权 // 菜单鉴权
if(StringUtil.isNotBlank(funcCode)) { if(StringUtil.isNotBlank(funcCode) && StringUtil.isNotBlank(userId)) {
FunctionEntity function = functionService.getFunctionByCode(funcCode); FunctionEntity function = functionService.getFunctionByCode(funcCode);
Assert.isTrue(Func.isNotEmpty(function) && StringUtil.isNotBlank(function.getRoute()),() -> {
throw new ServiceException("传入函数未获取到菜单,鉴权失败!");
});
if(Func.isNotEmpty(function.getRoute()) && StringUtil.isNotBlank(function.getRoute())) { if(Func.isNotEmpty(function.getRoute()) && StringUtil.isNotBlank(function.getRoute())) {
R<Boolean> authenticationR = userClient.permissionMenuById(Long.valueOf(userId), function.getRoute()); R<Boolean> authenticationR = userClient.permissionMenuById(Long.valueOf(userId), function.getRoute());
Assert.isTrue(authenticationR.isSuccess() && authenticationR.getData(), () -> { Assert.isTrue(authenticationR.isSuccess() && authenticationR.getData(), () -> {

Loading…
Cancel
Save