Commit c8caf246 by 111-PC\111

[+]场景使用次数修改

1 parent 61ec1661
......@@ -60,13 +60,16 @@ public class SceneTemplateController extends BaseController{
try {
eventTrackByUserFunctionList = userEventTrackAmountService.getEventTrackByUserFunctionList(userEventTrackAmountRequest);
} catch (ServiceException e) {
log.info("调用异常,{}",e);
e.printStackTrace();
}
List<UserEventTrackAmount> collect = eventTrackByUserFunctionList.stream().filter(ind -> ind.getFunctionId().equals(index.getId())).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(collect)) {
index.setUseCount(collect.get(0).getFunctionCount());
} else {
index.setUseCount(0);
if(CollectionUtils.isNotEmpty(eventTrackByUserFunctionList)) {
List<UserEventTrackAmount> collect = eventTrackByUserFunctionList.stream().filter(ind -> ind.getFunctionId().equals(index.getId())).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(collect)) {
index.setUseCount(collect.get(0).getFunctionCount());
} 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!