API调用量为0时为无限次

This commit is contained in:
majintao
2024-09-13 10:24:54 +08:00
parent b363320ccb
commit 9ce61bc2fa
@@ -647,7 +647,6 @@ public class ApiUserController {
AuthorityBo bo = new AuthorityBo(); AuthorityBo bo = new AuthorityBo();
BeanUtils.copyProperties(openResource, bo); BeanUtils.copyProperties(openResource, bo);
if (authority != null) { if (authority != null) {
bo.setHasAuth(authority.getOpenResourseUris().contains(bo.getUri()));
bo.setHasAuth(authority.getOpenResourseUris().contains(bo.getUri())); bo.setHasAuth(authority.getOpenResourseUris().contains(bo.getUri()));
model.setSupportLatLng(authority.isSupportLatLng()); model.setSupportLatLng(authority.isSupportLatLng());
bo.setLimitCountMap(authority.getLimitCountMap()); bo.setLimitCountMap(authority.getLimitCountMap());
@@ -760,7 +759,9 @@ public class ApiUserController {
apiCountLogService.save(apiCountLog); apiCountLogService.save(apiCountLog);
} }
} }
totalCountMap.put(model.getUri(), count); if (count == 0) {
totalCountMap.remove(model.getUri());
}
authority.setTotalCountMap(totalCountMap); authority.setTotalCountMap(totalCountMap);
} }
if (model.getIsCheckCount() != null) { if (model.getIsCheckCount() != null) {