Просмотр исходного кода

不是付费会员的用户领取付费会员券提示

evoxwht 2 лет назад
Родитель
Сommit
75b0434b89
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      crmeb/app/services/activity/coupon/StoreCouponIssueServices.php

+ 3 - 0
crmeb/app/services/activity/coupon/StoreCouponIssueServices.php

@@ -363,6 +363,9 @@ class StoreCouponIssueServices extends BaseServices
     public function issueUserCoupon($id, $user, bool $is_receive = false)
     {
         $issueCouponInfo = $this->dao->getInfo((int)$id);
+        if ($user->is_money_level <= 0 && $issueCouponInfo['receive_type'] == 4) {
+            throw new ApiException(400097);
+        }
         $uid = $user->uid;
         if (!$issueCouponInfo) throw new ApiException(400516);
         /** @var StoreCouponIssueUserServices $issueUserService */