Selaa lähdekoodia

优惠券查询问题

whitefang 1 vuosi sitten
vanhempi
sitoutus
d9a2335510
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  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) {