|
|
|
@ -60,9 +60,9 @@ class AgentProductController extends Controller |
|
|
|
|
|
|
|
// TODO 优惠券查询待优化
|
|
|
|
if (AgentProduct::withTrashed()->where('agent_id', $this->agent_id)->count() === 0) { //演示产品用
|
|
|
|
$where = ['id' => $id, 'agent_id' => $this->agent_id, 'status' => ProductStatus::ON_SALE]; |
|
|
|
} else { |
|
|
|
$where = ['id' => $id, 'status' => ProductStatus::ON_SALE]; |
|
|
|
} else { |
|
|
|
$where = ['id' => $id, 'agent_id' => $this->agent_id, 'status' => ProductStatus::ON_SALE]; |
|
|
|
} |
|
|
|
$agent_product = AgentProduct::query() |
|
|
|
->with(['coupon:tag,agent_product_id']) |
|
|
|
|