whitefang 1 год назад
Родитель
Сommit
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) {