Commit 5764ee18 by gdj

暂时超级管理员查看全部设备

parent 193e07e3
......@@ -56,6 +56,8 @@ import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import static com.dji.sample.common.util.SecurityUtils.aboveSysAdminRole;
/**
*
* @author sean.zhou
......@@ -543,7 +545,12 @@ public class DeviceServiceImpl extends ServiceImpl<IDeviceMapper, DeviceEntity>
LambdaQueryWrapper<DeviceEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(DeviceEntity::getDomain, param.getDomain());
wrapper.eq(DeviceEntity::getWorkspaceId, workspaceId);
// 假如是超级管理员 查询全部设备
if (aboveSysAdminRole()) {
} else {
wrapper.eq(DeviceEntity::getWorkspaceId, workspaceId);
}
// 设备名称
if (StringUtils.hasText(param.getDeviceName())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment