Jelajahi Sumber

完善功能

gorden 10 bulan lalu
induk
melakukan
9a47c56919

+ 2 - 1
app/admin/service/goods/GoodsService.php

@@ -548,11 +548,12 @@ class GoodsService
             // 根据goods_id 查详情ID
             $detail = GoodsRunning::where('join_running_goods_id', $params['goods_id'])->first();
             if ($detail) {
-                self::doUpdate($detail->goods_running_id, $data, new GoodsRunning());
+                self::doUpdate($detail->join_running_goods_id, $data, new GoodsRunning());
             }
         } catch (BusinessException $e) {
             throw new BusinessException($e->getMessage());
         } catch (\Exception $e) {
+            dump($e->getMessage());
             throw new BusinessException('数据更新异常~4');
         }
     }

+ 1 - 1
app/model/GoodsDetail.php

@@ -8,7 +8,7 @@ class GoodsDetail extends Model
 {
     protected $table = 'goods_detail';
 
-    protected $primaryKey = 'goods_detail_id';
+    protected $primaryKey = 'join_detail_goods_id';
 
     const CREATED_AT = null;
 

+ 1 - 1
app/model/GoodsRunning.php

@@ -8,7 +8,7 @@ class GoodsRunning extends Model
 {
     protected $table = 'goods_running';
 
-    protected $primaryKey = 'goods_running_id';
+    protected $primaryKey = 'join_running_goods_id';
 
     const CREATED_AT = null;