Browse Source

测试

master
李可松 4 years ago
parent
commit
3399128ca0
  1. 9
      app/Http/Controllers/Api/TestController.php

9
app/Http/Controllers/Api/TestController.php

@ -17,14 +17,7 @@ class TestController
{
public function index()
{
dd(AgentProduct::withoutGlobalScope('orderById')
->whereDoesntHave('agentProductItem', function ($query) {
return $query->whereHas('product', function ($query) {
return $query->where('stock', '<=', 0)->orWhere('status', '<>', ProductStatus::ON_SALE);
});
})
->where('stock', '>', 0)->where(['agent_id' => 10, 'status' => ProductStatus::ON_SALE])
->select('id', 'sale', 'product_id', 'price', 'original_price', 'title', 'pictures')->withTrashed()->count());
dd(AgentProduct::where('agent_id', 10)->withTrashed()->count());
}
/**

Loading…
Cancel
Save