소스 검색

优惠券查询问题

whitefang 2 년 전
부모
커밋
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) {