|
@@ -123,6 +123,12 @@ class StoreCouponIssueServices extends BaseServices
|
|
|
$data['is_permanent'] = 1;
|
|
$data['is_permanent'] = 1;
|
|
|
$data['total_count'] = 0;
|
|
$data['total_count'] = 0;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ if ($data['is_permanent'] != 1 && $data['receive_limit'] > $data['total_count']) {
|
|
|
|
|
+ throw new AdminException(500031);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
$data['add_time'] = time();
|
|
$data['add_time'] = time();
|
|
|
$res = $this->dao->save($data);
|
|
$res = $this->dao->save($data);
|
|
|
if (($data['product_id'] !== '' || $data['category_id'] !== '') && $res) {
|
|
if (($data['product_id'] !== '' || $data['category_id'] !== '') && $res) {
|