mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 16:30:29 +08:00
elevator(listFloor): validate acsPersonService.page result per §2.2
- Throw ServiceException when page RPC fails (align with zoneTree branch) - Guard null page data; rowsOfPage=1 for totalRows-only reads - Document walkthrough sign-off and status in 走查任务与状态 §5 Made-with: Cursor
This commit is contained in:
+11
-2
@@ -114,10 +114,19 @@ public class AcsPassRuleServiceImpl extends AbstractAcsPassService implements Ac
|
||||
passRuleResult.setDeviceNumber(Integer.valueOf(deviceList.size()));
|
||||
AcsPersonQueryParam personParam = new AcsPersonQueryParam();
|
||||
personParam.setZoneId(passRuleResult.getId());
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(1, 10);
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(1, 1);
|
||||
CloudwalkResult<CloudwalkPageAble<AcsPersonResult>> page =
|
||||
this.acsPersonService.page(personParam, pageInfo, context);
|
||||
passRuleResult.setPersonNumber(Long.valueOf(((CloudwalkPageAble)page.getData()).getTotalRows()));
|
||||
if (!page.isSuccess()) {
|
||||
this.logger.info("远程调用查询通行人员分页失败,原因:" + page.getMessage());
|
||||
throw new ServiceException(page.getCode(), page.getMessage());
|
||||
}
|
||||
if (ObjectUtils.isEmpty(page.getData())) {
|
||||
passRuleResult.setPersonNumber(Long.valueOf(0L));
|
||||
} else {
|
||||
passRuleResult.setPersonNumber(
|
||||
Long.valueOf(((CloudwalkPageAble)page.getData()).getTotalRows()));
|
||||
}
|
||||
}
|
||||
return CloudwalkResult.success(passRuleResults);
|
||||
} catch (DataAccessException e) {
|
||||
|
||||
Reference in New Issue
Block a user