mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update: fix coupon multi generate
This commit is contained in:
parent
82730acdac
commit
d76c2b3bca
@ -90,8 +90,8 @@ class CouponController extends Controller
|
||||
DB::beginTransaction();
|
||||
if (!Coupon::insert(array_map(function ($item) use ($coupon) {
|
||||
// format data
|
||||
$item['limit_plan_ids'] = json_encode($coupon['limit_plan_ids']);
|
||||
$item['limit_period'] = json_encode($coupon['limit_period']);
|
||||
if (is_array($item['limit_plan_ids'])) $item['limit_plan_ids'] = json_encode($coupon['limit_plan_ids']);
|
||||
if (is_array($item['limit_period'])) $item['limit_period'] = json_encode($coupon['limit_period']);
|
||||
return $item;
|
||||
}, $coupons))) {
|
||||
DB::rollBack();
|
||||
|
Loading…
Reference in New Issue
Block a user