|
|
@ -30,7 +30,7 @@ class ProductServiceProvider extends ServiceProvider |
|
|
*/ |
|
|
*/ |
|
|
public function boot() |
|
|
public function boot() |
|
|
{ |
|
|
{ |
|
|
Product::updated(function ($product) { |
|
|
|
|
|
|
|
|
Product::saved(function ($product) { |
|
|
if ($product->isDirty('status') && $product->status == ProductStatus::ON_SALE) { |
|
|
if ($product->isDirty('status') && $product->status == ProductStatus::ON_SALE) { |
|
|
/** 同步信息到代理商产品 START */ |
|
|
/** 同步信息到代理商产品 START */ |
|
|
AgentProduct::query() |
|
|
AgentProduct::query() |
|
|
@ -55,7 +55,6 @@ class ProductServiceProvider extends ServiceProvider |
|
|
} |
|
|
} |
|
|
/** 自动上架 END */ |
|
|
/** 自动上架 END */ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |