|
@@ -354,19 +354,15 @@ public class SceneCooperationServiceImpl extends ServiceImpl<ISceneCooperationMa
|
|
|
|
|
|
|
|
|
private ProductOrder checkNeedPay(List<String> numList, List<User> users,User loginUser,Integer payType,Integer timeZone,Long cameraId,String lang) {
|
|
|
- Integer totalCount = (users.size() -1) * numList.size();
|
|
|
+ Integer totalCount = 0;
|
|
|
HashMap<String, List<User>> map = this.getByNumList(numList);
|
|
|
for (String num : map.keySet()) {
|
|
|
- List<User> users1 = map.get(num);
|
|
|
- if (users1.isEmpty()){
|
|
|
- totalCount += users.size() ;
|
|
|
+ List<User> dbUserList = map.get(num);
|
|
|
+ if (dbUserList.isEmpty()){
|
|
|
+ totalCount += users.size() -1 ;
|
|
|
continue;
|
|
|
}
|
|
|
- List<Long> collect1 = users1.stream().map(User::getId).collect(Collectors.toList());
|
|
|
- List<Long> collect2 = users.stream().map(User::getId).collect(Collectors.toList());
|
|
|
- List<Long> collect = collect2.stream().filter(e -> !collect1.contains(e)).collect(Collectors.toList());
|
|
|
-
|
|
|
- totalCount += collect.size();
|
|
|
+ totalCount += users.size() - dbUserList.size() ;
|
|
|
|
|
|
}
|
|
|
if(totalCount <=0){
|