shish 3 سال پیش
والد
کامیت
2057320aec
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      console/controllers/OrderItemController.php

+ 4 - 0
console/controllers/OrderItemController.php

@@ -33,6 +33,10 @@ class OrderItemController extends Controller
                     if ($cost < 10 && $cost > $xhPrice) {
                         echo $productId . ' ' . $name . ' 成本:' . $cost . ' 价格:' . $xhPrice . ' 比例:' . $ratio . "\n";
                     }
+                    if (floatval($xhPrice) == 0) {
+                        $item->cost = 0;
+                        $item->save();
+                    }
                 }
             }
         }