|
|
@@ -164,17 +164,33 @@ public class DevicePermissVerifyService {
|
|
|
boolean b = permissSettingListDao.isExit(search);
|
|
|
if (b) {
|
|
|
hasPermission = true;
|
|
|
+ } else {
|
|
|
+ msg = "未查询到权限";
|
|
|
}
|
|
|
stopWatch.stop();
|
|
|
} else {
|
|
|
hasPermission = false;
|
|
|
+ if (ObjectUtils.isEmpty(deviceCacheModel)) {
|
|
|
+ msg = "设备权限为空";
|
|
|
+ } else if (!deviceCacheModel.isSuccess()) {
|
|
|
+ msg = deviceCacheModel.getMsg();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ hasPermission = false;
|
|
|
+ if (ObjectUtils.isEmpty(permissTimeSlots)) {
|
|
|
+ msg = "规则时间段为空";
|
|
|
+ } else if (ObjectUtils.isEmpty(userCacheModel)) {
|
|
|
+ msg = "用户权限数据为空";
|
|
|
+ } else if (!userCacheModel.isSuccess()) {
|
|
|
+ msg = userCacheModel.getMsg();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ log.info("权限验证:{}", stopWatch.prettyPrint());
|
|
|
if (!hasPermission) {
|
|
|
- return ResultContent.buildFail("验证失败");
|
|
|
+ return ResultContent.buildFail(msg);
|
|
|
}
|
|
|
- log.info("权限验证:{}", stopWatch.prettyPrint());
|
|
|
return ResultContent.buildSuccess(msg);
|
|
|
}
|
|
|
|