|
@@ -33,18 +33,18 @@ public class ProductCooperationServiceImpl extends ServiceImpl<IProductCooperati
|
|
|
IProductOrderService productOrderService;
|
|
|
|
|
|
@Override
|
|
|
- public void add(ProductOrder productOrder, List<User> users,List<String> list , HashSet<String> numList, HashSet<String> numLis2, String sceneType) {
|
|
|
+ public void add(ProductOrder productOrder, List<User> users,List<String> list , HashMap<Long,String> map1, HashMap<Long,String> map2, String sceneType) {
|
|
|
|
|
|
if(StringUtils.isBlank(sceneType)){
|
|
|
- this.saveList(productOrder,users,list,numList,"mesh");
|
|
|
- this.saveList(productOrder,users,list,numLis2,"laser");
|
|
|
+ this.saveList(productOrder,users,list,map1,"mesh");
|
|
|
+ this.saveList(productOrder,users,list,map2,"laser");
|
|
|
}else {
|
|
|
- this.saveList(productOrder,users,list,numList,sceneType);
|
|
|
+ this.saveList(productOrder,users,list,map1,sceneType);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
- private void saveList(ProductOrder productOrder, List<User> users,List<String> list , HashSet<String> numList,String sceneType){
|
|
|
+ private void saveList(ProductOrder productOrder, List<User> users,List<String> list , HashMap<Long,String> map1,String sceneType){
|
|
|
List<ProductCooperation> productCooperations = new ArrayList<>();
|
|
|
|
|
|
for (String num : list) {
|
|
@@ -54,7 +54,7 @@ public class ProductCooperationServiceImpl extends ServiceImpl<IProductCooperati
|
|
|
productCooperation.setCooperationUserId(user.getId());
|
|
|
productCooperation.setNum(num);
|
|
|
productCooperation.setSceneType(sceneType);
|
|
|
- if(numList.contains(num)){
|
|
|
+ if(map1.get(user.getId()) != null){
|
|
|
productCooperation.setNeedPay(1);
|
|
|
}
|
|
|
productCooperations.add(productCooperation);
|