|
@@ -42,7 +42,6 @@ public class SceneCooperationCountServiceImpl extends ServiceImpl<ISceneCooperat
|
|
|
continue;
|
|
|
}
|
|
|
hashSet.add(productCooperation.getNum()+productCooperation.getSceneType());
|
|
|
- List<SceneCooperation> sceneCooperations = sceneCooperationService.getByNum(productCooperation.getNum(), productCooperation.getSceneType());
|
|
|
|
|
|
String num = productCooperation.getNum();
|
|
|
SceneCooperationCount byNum = this.getByNum(num, productCooperation.getSceneType());
|
|
@@ -50,12 +49,12 @@ public class SceneCooperationCountServiceImpl extends ServiceImpl<ISceneCooperat
|
|
|
SceneCooperationCount count = new SceneCooperationCount();
|
|
|
count.setSceneType(productCooperation.getSceneType());
|
|
|
count.setNum(num);
|
|
|
- count.setCount(size + sceneCooperations.size());
|
|
|
+ count.setCount( needPay.size() + 1);
|
|
|
this.save(count);
|
|
|
}else {
|
|
|
LambdaUpdateWrapper<SceneCooperationCount> wrapper = new LambdaUpdateWrapper<>();
|
|
|
wrapper.eq(SceneCooperationCount::getId,byNum.getId());
|
|
|
- wrapper.set(SceneCooperationCount::getCount,size + sceneCooperations.size());
|
|
|
+ wrapper.set(SceneCooperationCount::getCount, byNum.getCount() + needPay.size());
|
|
|
this.update(wrapper);
|
|
|
}
|
|
|
}
|