REQ-3754: 避免查询空列表
This commit is contained in:
parent
3c05e5f5c1
commit
6241988df9
@ -43,6 +43,8 @@ public class PushDeviceService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public PushDeviceSnapshots createDeviceSnapshots(Collection<Long> personIds) {
|
public PushDeviceSnapshots createDeviceSnapshots(Collection<Long> personIds) {
|
||||||
|
if (CollectionUtils.isNotEmpty(personIds))
|
||||||
|
return new PushDeviceSnapshots(this, Collections.emptyList());
|
||||||
ArrayList<Long> uniquePersonIds = new ArrayList<>(new HashSet<>(personIds));
|
ArrayList<Long> uniquePersonIds = new ArrayList<>(new HashSet<>(personIds));
|
||||||
BatchFetchDeviceByPersonIdAndTerminalReq request = new BatchFetchDeviceByPersonIdAndTerminalReq();
|
BatchFetchDeviceByPersonIdAndTerminalReq request = new BatchFetchDeviceByPersonIdAndTerminalReq();
|
||||||
request.setPersonIds(uniquePersonIds);
|
request.setPersonIds(uniquePersonIds);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user