|
|
@@ -341,6 +341,9 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
@Autowired
|
|
|
private WxMaProperties properties;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private FsStoreProductAttrValueScrmMapper fsStoreProductAttrValueScrmMapper;
|
|
|
+
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
@@ -2065,7 +2068,15 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
|
|
|
}
|
|
|
} else {
|
|
|
ErpOrderItem item = new ErpOrderItem();
|
|
|
- item.setItem_code(cartDTO.getBarCode().trim());
|
|
|
+ if(StringUtils.isEmpty(cartDTO.getBarCode())) {
|
|
|
+ List<FsStoreProductAttrValueScrm> valueScrms = fsStoreProductAttrValueScrmMapper.selectFsStoreProductAttrValueByProductId(orderItem.getProductId());
|
|
|
+ if (!CollectionUtils.isEmpty(valueScrms)) {
|
|
|
+ item.setItem_code(valueScrms.get(0).getBarCode());
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ item.setItem_code(cartDTO.getBarCode().trim());
|
|
|
+ }
|
|
|
+
|
|
|
item.setPrice(cartDTO.getPrice().toString());
|
|
|
item.setQty(cartDTO.getNum());
|
|
|
item.setRefund(0);
|