|
|
@@ -612,7 +612,7 @@ class Order extends Base |
|
|
|
$flash = $orderModel->alias("o")-> |
|
|
|
join("unishop_order_product","unishop_order_product.order_id =o.id") |
|
|
|
->join("unishop_flash_sale","unishop_order_product.flash_id=unishop_flash_sale.id") |
|
|
|
->where(["o.id"=>(int)$order_id]) |
|
|
|
->where(["o.id"=>(int)$order_id,"unishop_flash_sale.status"=>0,"unishop_flash_sale.switch"=>1,"unishop_flash_sale.deletetime"=>0]) |
|
|
|
->field("flash_id,product_id,endtime")->find(); |
|
|
|
if (!$flash || $flash->endtime < time()){ |
|
|
|
$this->error("活动已结束,不支持退款"); |
|
|
|