|
|
@ -48,10 +48,12 @@ class CouponRebateController extends BaseController |
|
|
$ids = explode(',', $ids); |
|
|
$ids = explode(',', $ids); |
|
|
$now = time(); |
|
|
$now = time(); |
|
|
|
|
|
|
|
|
// moke 数据 给前端用
|
|
|
|
|
|
|
|
|
// mock 数据 给前端用
|
|
|
$test = $this->request->input("test", 0); |
|
|
$test = $this->request->input("test", 0); |
|
|
if($test){ |
|
|
if($test){ |
|
|
$cps = Coupon::whereIn('id', $ids)->lockForUpdate()->first(); |
|
|
|
|
|
|
|
|
$cps = Coupon::whereIn('id', $ids)->lockForUpdate() |
|
|
|
|
|
->select('id','title','status','inventory','inventory_use','start_time','end_time') |
|
|
|
|
|
->first(); |
|
|
return $this->success([ |
|
|
return $this->success([ |
|
|
'success' => [$cps], |
|
|
'success' => [$cps], |
|
|
'fail' => [], |
|
|
'fail' => [], |
|
|
|