mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-31 15:00:52 +00:00
添加时要校验用户领取的数量不能大于优惠券发放的限量
This commit is contained in:
parent
8cb9a50b22
commit
1afa4b504d
@ -123,6 +123,12 @@ class StoreCouponIssueServices extends BaseServices
|
||||
$data['is_permanent'] = 1;
|
||||
$data['total_count'] = 0;
|
||||
}
|
||||
|
||||
if ($data['is_permanent'] != 1 && $data['receive_limit'] > $data['total_count']) {
|
||||
throw new AdminException(500031);
|
||||
}
|
||||
|
||||
|
||||
$data['add_time'] = time();
|
||||
$res = $this->dao->save($data);
|
||||
if (($data['product_id'] !== '' || $data['category_id'] !== '') && $res) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user