whitefang 1 рік тому
батько
коміт
d9a2335510
1 змінених файлів з 4 додано та 0 видалено
  1. 4 0
      app/api/logic/UserCouponLogic.php

+ 4 - 0
app/api/logic/UserCouponLogic.php

@@ -25,6 +25,10 @@ class UserCouponLogic extends BaseLogic
                 ->whereIn('code',$params['codes'])
                 ->where('voucher_count','>',0)
                 ->select();
+
+            if($rules->isEmpty()){
+                $errMsgArr[] = '优惠券不存在';
+            }
             $updateData = [];
             $createData = [];
             foreach($rules as $v) {