feat(REQ-2300): 数据权限查询不抛异常
This commit is contained in:
parent
bd731682b4
commit
50d569df41
@ -33,6 +33,7 @@ import cn.axzo.tyr.server.repository.entity.DataObjectRuleScope;
|
||||
import cn.axzo.tyr.server.service.DataObjectService;
|
||||
import cn.axzo.tyr.server.utils.mapper.DataObjectMapper;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.google.common.collect.Lists;
|
||||
import groovy.lang.Tuple2;
|
||||
@ -289,7 +290,8 @@ public class DataObjectServiceImpl implements DataObjectService {
|
||||
.eq(Objects.nonNull(req.getTenantScope()), DataObject::getTenantScope, req.getTenantScope())
|
||||
.list();
|
||||
if (CollectionUtils.isEmpty(dataObjects)) {
|
||||
throw new cn.axzo.framework.domain.ServiceException(ReturnCodeEnum.DATA_NOT_EXIST.getMessage());
|
||||
log.warn("数据权限记录不存在,param:{}", JSON.toJSONString(req));
|
||||
return null;
|
||||
}
|
||||
return buildDataObjectRes(dataObjects.get(0));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user