| 
														
															@@ -18,6 +18,7 @@ import cn.hutool.core.util.IdUtil; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import cn.hutool.core.util.NumberUtil; 
														 | 
														
														 | 
														
															 import cn.hutool.core.util.NumberUtil; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import cn.hutool.core.util.ObjectUtil; 
														 | 
														
														 | 
														
															 import cn.hutool.core.util.ObjectUtil; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import cn.hutool.core.util.StrUtil; 
														 | 
														
														 | 
														
															 import cn.hutool.core.util.StrUtil; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import cn.hutool.json.JSONArray; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import cn.hutool.json.JSONUtil; 
														 | 
														
														 | 
														
															 import cn.hutool.json.JSONUtil; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.alibaba.fastjson.JSON; 
														 | 
														
														 | 
														
															 import com.alibaba.fastjson.JSON; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -56,6 +57,8 @@ import com.fs.live.vo.LiveOrderItemVo; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.live.vo.LiveOrderListVo; 
														 | 
														
														 | 
														
															 import com.fs.live.vo.LiveOrderListVo; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.live.vo.LiveOrderVo; 
														 | 
														
														 | 
														
															 import com.fs.live.vo.LiveOrderVo; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.store.cache.IFsExpressCacheService; 
														 | 
														
														 | 
														
															 import com.fs.store.cache.IFsExpressCacheService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.fs.store.cache.IFsStoreProductAttrValueCacheService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.fs.store.cache.impl.IFsStoreProductCacheServiceImpl; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.store.domain.*; 
														 | 
														
														 | 
														
															 import com.fs.store.domain.*; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.store.dto.*; 
														 | 
														
														 | 
														
															 import com.fs.store.dto.*; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.store.enums.*; 
														 | 
														
														 | 
														
															 import com.fs.store.enums.*; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -175,6 +178,15 @@ public class LiveOrderServiceImpl implements ILiveOrderService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @Autowired 
														 | 
														
														 | 
														
															     @Autowired 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     private LiveOrderPaymentErrorMapper liveOrderPaymentErrorMapper; 
														 | 
														
														 | 
														
															     private LiveOrderPaymentErrorMapper liveOrderPaymentErrorMapper; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    @Autowired 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    private IFsStoreProductGroupService storeProductGroupService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    @Autowired 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    private IFsStoreProductAttrValueCacheService fsStoreProductAttrValueCacheService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    @Autowired 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    private IFsStoreProductCacheServiceImpl fsStoreProductCacheService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @Autowired 
														 | 
														
														 | 
														
															     @Autowired 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -1295,7 +1307,28 @@ public class LiveOrderServiceImpl implements ILiveOrderService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             FsStoreCartDTO cartDTO= JSONUtil.toBean(orderItem.getJsonInfo(),FsStoreCartDTO.class); 
														 | 
														
														 | 
														
															             FsStoreCartDTO cartDTO= JSONUtil.toBean(orderItem.getJsonInfo(),FsStoreCartDTO.class); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             //如果是组合码,查询出真实的商品数据 然后写入 
														 | 
														
														 | 
														
															             //如果是组合码,查询出真实的商品数据 然后写入 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if(StringUtils.isNotEmpty(cartDTO.getGroupBarCode())){ 
														 | 
														
														 | 
														
															             if(StringUtils.isNotEmpty(cartDTO.getGroupBarCode())){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															- 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                FsStoreProductGroup group=storeProductGroupService.selectFsStoreProductGroupByBarCode(cartDTO.getGroupBarCode().trim()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                if(group!=null){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    JSONArray jsonArray=JSONUtil.parseArray(group.getProducts()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    List<StoreProductGroupDTO> productGroupDTOS=JSONUtil.toList(jsonArray, StoreProductGroupDTO.class); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    if(productGroupDTOS!=null){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        for(StoreProductGroupDTO dto:productGroupDTOS){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            FsStoreProductAttrValue attrValue=fsStoreProductAttrValueCacheService.selectFsStoreProductAttrValueById(dto.getId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            ErpOrderItem item=new ErpOrderItem(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            item.setItem_code(attrValue.getBarCode()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            item.setPrice(attrValue.getPrice().toString()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            item.setQty(dto.getCount()*cartDTO.getNum()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            item.setRefund(0); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            // 查询仓库代码 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            String warehouseCode = fsStoreProductCacheService.getWarehouseCodeByProductId(attrValue.getProductId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            if(StringUtils.isNotBlank(warehouseCode)){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                                item.setWarehouseCode(warehouseCode); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                            details.add(item); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             else{ 
														 | 
														
														 | 
														
															             else{ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 ErpOrderItem item=new ErpOrderItem(); 
														 | 
														
														 | 
														
															                 ErpOrderItem item=new ErpOrderItem(); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -2217,14 +2250,13 @@ public class LiveOrderServiceImpl implements ILiveOrderService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 LiveOrderItemDTO dto=new LiveOrderItemDTO(); 
														 | 
														
														 | 
														
															                 LiveOrderItemDTO dto=new LiveOrderItemDTO(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 dto.setImage(fsStoreProduct.getImage()); 
														 | 
														
														 | 
														
															                 dto.setImage(fsStoreProduct.getImage()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 dto.setSku(String.valueOf(fsStoreProduct.getStock())); 
														 | 
														
														 | 
														
															                 dto.setSku(String.valueOf(fsStoreProduct.getStock())); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                if (StringUtils.isEmpty(fsStoreProduct.getBarCode())) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    FsStoreProductAttrValue fsStoreProductAttrValue = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueByProductId(fsStoreProduct.getProductId()).stream().filter(attrValue -> StringUtils.isNotEmpty(attrValue.getBarCode())).findFirst().orElse(null); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    if (fsStoreProductAttrValue != null) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                        dto.setBarCode(fsStoreProductAttrValue.getBarCode()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                } else { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    dto.setBarCode(fsStoreProduct.getBarCode()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                FsStoreProductAttrValue fsStoreProductAttrValue = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueByProductId(fsStoreProduct.getProductId()).stream().filter(attrValue -> StringUtils.isNotEmpty(attrValue.getBarCode())).findFirst().orElse(null); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                if (fsStoreProductAttrValue != null) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    dto.setBarCode(fsStoreProductAttrValue.getBarCode()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    dto.setGroupBarCode(fsStoreProductAttrValue.getGroupBarCode()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 dto.setPrice(fsStoreProduct.getPrice()); 
														 | 
														
														 | 
														
															                 dto.setPrice(fsStoreProduct.getPrice()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 dto.setProductName(fsStoreProduct.getProductName()); 
														 | 
														
														 | 
														
															                 dto.setProductName(fsStoreProduct.getProductName()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 dto.setNum(Long.valueOf(liveOrder.getTotalNum())); 
														 | 
														
														 | 
														
															                 dto.setNum(Long.valueOf(liveOrder.getTotalNum())); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -2427,6 +2459,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     FsStoreProductAttrValue fsStoreProductAttrValue = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueByProductId(fsStoreProduct.getProductId()).stream().filter(attrValue -> StringUtils.isNotEmpty(attrValue.getBarCode())).findFirst().orElse(null); 
														 | 
														
														 | 
														
															                     FsStoreProductAttrValue fsStoreProductAttrValue = fsStoreProductAttrValueMapper.selectFsStoreProductAttrValueByProductId(fsStoreProduct.getProductId()).stream().filter(attrValue -> StringUtils.isNotEmpty(attrValue.getBarCode())).findFirst().orElse(null); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     if (fsStoreProductAttrValue != null) { 
														 | 
														
														 | 
														
															                     if (fsStoreProductAttrValue != null) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                         dto.setBarCode(fsStoreProductAttrValue.getBarCode()); 
														 | 
														
														 | 
														
															                         dto.setBarCode(fsStoreProductAttrValue.getBarCode()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        dto.setGroupBarCode(fsStoreProductAttrValue.getGroupBarCode()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     } 
														 | 
														
														 | 
														
															                     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } else { 
														 | 
														
														 | 
														
															                 } else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     dto.setBarCode(fsStoreProduct.getBarCode()); 
														 | 
														
														 | 
														
															                     dto.setBarCode(fsStoreProduct.getBarCode()); 
														 |