moonsflyer il y a 6 mois
Parent
commit
2bdd214e4e
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      app/shopapi/logic/Order/OrderLogic.php

+ 1 - 1
app/shopapi/logic/Order/OrderLogic.php

@@ -637,7 +637,7 @@ class OrderLogic extends BaseLogic
             // 更新商品总库存 - 使用子查询直接更新,避免查询和更新之间的间隙
             // 更新商品总库存 - 使用子查询直接更新,避免查询和更新之间的间隙
             Goods::where(['id' => $goods['goods_id']])
             Goods::where(['id' => $goods['goods_id']])
                 ->update([
                 ->update([
-                    'total_stock' => Db::raw("(SELECT SUM(stock) FROM goods_item WHERE goods_id = " . $goods['goods_id'] . ")")
+                    'total_stock' => Db::raw("(SELECT SUM(stock) FROM nf_goods_item WHERE goods_id = " . $goods['goods_id'] . ")")
                 ]);
                 ]);
         }
         }
     }
     }