Commit c8caf246 by 111-PC\111

[+]场景使用次数修改

1 parent 61ec1661
...@@ -60,13 +60,16 @@ public class SceneTemplateController extends BaseController{ ...@@ -60,13 +60,16 @@ public class SceneTemplateController extends BaseController{
try { try {
eventTrackByUserFunctionList = userEventTrackAmountService.getEventTrackByUserFunctionList(userEventTrackAmountRequest); eventTrackByUserFunctionList = userEventTrackAmountService.getEventTrackByUserFunctionList(userEventTrackAmountRequest);
} catch (ServiceException e) { } catch (ServiceException e) {
log.info("调用异常,{}",e);
e.printStackTrace(); e.printStackTrace();
} }
List<UserEventTrackAmount> collect = eventTrackByUserFunctionList.stream().filter(ind -> ind.getFunctionId().equals(index.getId())).collect(Collectors.toList()); if(CollectionUtils.isNotEmpty(eventTrackByUserFunctionList)) {
if (CollectionUtils.isNotEmpty(collect)) { List<UserEventTrackAmount> collect = eventTrackByUserFunctionList.stream().filter(ind -> ind.getFunctionId().equals(index.getId())).collect(Collectors.toList());
index.setUseCount(collect.get(0).getFunctionCount()); if (CollectionUtils.isNotEmpty(collect)) {
} else { index.setUseCount(collect.get(0).getFunctionCount());
index.setUseCount(0); } else {
index.setUseCount(0);
}
} }
}); });
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!