order item_src_id 判空

This commit is contained in:
Jack 2025-07-05 09:45:17 +08:00
parent 58aee5a5f6
commit e4b6aaac02

View File

@ -6612,7 +6612,12 @@ public class ShopOrderBaseServiceImpl extends BaseServiceImpl<ShopOrderBaseMappe
ShopOrderItem item_row = new ShopOrderItem();
Long product_id = Convert.toLong(_item.get("product_id"));
Long item_id = Convert.toLong(_item.get("item_id"));
Long item_src_id = Convert.toLong(_item.get("item_src_id"));
Long item_src_id = Convert.toLong(_item.get("item_src_id")); // 商品 SKU id
if (CheckUtil.isEmpty(item_src_id)) {
item_src_id = item_id;
}
String product_item_name = (String) _item.get("product_item_name");
String cart_file = (String) _item.get("cart_file");
Integer category_id = Convert.toInt(item.get("category_id"));
@ -6649,7 +6654,7 @@ public class ShopOrderBaseServiceImpl extends BaseServiceImpl<ShopOrderBaseMappe
item_row.setStore_id((Integer) base_row.get("store_id")); // 店铺ID
item_row.setProduct_id(product_id); // 产品id
item_row.setItem_id(item_id); // 货品id
item_row.setItem_src_id(item_src_id); // 货品id
item_row.setItem_src_id(item_src_id); // 商品 SKU id
item_row.setItem_name(product_item_name); // 商品名称
item_row.setOrder_item_file(cart_file); // 订单附件
item_row.setCategory_id(category_id); // 商品对应的类目ID