소스 검색

一些功能

Kirin 4 년 전
부모
커밋
6f6985b6dd
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      app/admin/model/system/SystemStoreProductStockLog.php

+ 4 - 0
app/admin/model/system/SystemStoreProductStockLog.php

@@ -63,6 +63,8 @@ class SystemStoreProductStockLog extends BaseModel
             $add_time = time();
             $add_time = time();
             $stock_id = $stock['id'];
             $stock_id = $stock['id'];
             return self::create(compact('stock_id', 'link_id', 'type', 'number', 'balance', 'mark', 'status', 'pm', 'add_time', 'adder_id'));
             return self::create(compact('stock_id', 'link_id', 'type', 'number', 'balance', 'mark', 'status', 'pm', 'add_time', 'adder_id'));
+        } else if ($price > 0) {
+            return SystemStoreProductStock::where('id', $stock['id'])->update(['price' => $price]);
         } else {
         } else {
             return true;
             return true;
         }
         }
@@ -92,6 +94,8 @@ class SystemStoreProductStockLog extends BaseModel
             $add_time = time();
             $add_time = time();
             $stock_id = $stock['id'];
             $stock_id = $stock['id'];
             return self::create(compact('stock_id', 'link_id', 'type', 'number', 'balance', 'mark', 'status', 'pm', 'add_time', 'adder_id'));
             return self::create(compact('stock_id', 'link_id', 'type', 'number', 'balance', 'mark', 'status', 'pm', 'add_time', 'adder_id'));
+        } else if ($price > 0) {
+            return SystemStoreProductStock::where('id', $stock['id'])->update(['price' => $price]);
         } else {
         } else {
             return true;
             return true;
         }
         }