鲜花2.0-接口测试bug修复

This commit is contained in:
杨建炊 2024-08-08 17:06:50 +08:00
parent ea56daa372
commit e0fce64e18

View File

@ -69,10 +69,15 @@ class PurchaseRecordController extends Controller
if (!empty($goodsSku)) {
$expireDay = DeveloperConfigService::getDefaultExpireDay();
$today = DateTimeUtils::getToday();
if (empty($allParams['buyer_user_id'])) {
$buyerUserId = User::query()->where("name", $allParams['buyer_name'] ?? '')
->pluck("id")->first();
$supplierId = Suppliers::query()->where("name", $allParams['supplier_name'] ?? '')
}
if (empty($allParams['supplier_id'])) {
$supplierId = Suppliers::query()->where("supplier_name", $allParams['supplier_name'] ?? '')
->pluck("id")->first();
}
//保存記錄
$purchaseRecords = new PurchaseRecords();
$purchaseRecords->external_sku_id = $allParams['external_sku_id'];