|
|
|
@ -194,7 +194,7 @@ public class InteractiveServiceImpl implements IInteractiveService {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Boolean authentication(String stationId, String userId, String funcCode) { |
|
|
|
|
public Boolean authentication(String stationId, String userId, String func) { |
|
|
|
|
// 站点鉴权
|
|
|
|
|
if(StringUtil.isNotBlank(stationId)) { |
|
|
|
|
List<String> stations = this.getStationPermissionsById(userId).stream().map(DeptStationDTO::getStationId) |
|
|
|
@ -204,9 +204,9 @@ public class InteractiveServiceImpl implements IInteractiveService {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
// 菜单鉴权
|
|
|
|
|
if(StringUtil.isNotBlank(funcCode) && StringUtil.isNotBlank(userId)) { |
|
|
|
|
FunctionEntity function = functionService.getFunctionByCode(funcCode); |
|
|
|
|
if(Func.isNotEmpty(function.getRoute()) && StringUtil.isNotBlank(function.getRoute())) { |
|
|
|
|
if(StringUtil.isNotBlank(func) && StringUtil.isNotBlank(userId)) { |
|
|
|
|
FunctionEntity function = functionService.getFunctionByCode(func); |
|
|
|
|
if(Func.isNotEmpty(function) && Func.isNotEmpty(function.getRoute()) && StringUtil.isNotBlank(function.getRoute())) { |
|
|
|
|
R<Boolean> authenticationR = userClient.permissionMenuById(Long.valueOf(userId), function.getRoute()); |
|
|
|
|
Assert.isTrue(authenticationR.isSuccess() && authenticationR.getData(), () -> { |
|
|
|
|
throw new ServiceException("人员菜单鉴权失败!"); |
|
|
|
|