Explorar o código

我的优惠券列表

whitefang hai 1 ano
pai
achega
591c04d6a1
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      app/api/logic/UserCouponLogic.php

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

@@ -87,10 +87,12 @@ class UserCouponLogic extends BaseLogic
     {
     {
         try{
         try{
             $where = [];
             $where = [];
+            $where[] = ['voucher_status','=',0];
             if(isset($params['voucher_status']) && is_array($params['voucher_status'])){
             if(isset($params['voucher_status']) && is_array($params['voucher_status'])){
                 $where[] = ['voucher_status','IN',$params['voucher_status']];
                 $where[] = ['voucher_status','IN',$params['voucher_status']];
             }
             }
             $where[] = ['user_id','=',$params['user_id']];
             $where[] = ['user_id','=',$params['user_id']];
+
             $data = UserCoupon::where($where)
             $data = UserCoupon::where($where)
                 ->where(function(Query $query){
                 ->where(function(Query $query){
                     $query->where(' expire_time >'. (time()-86400*7));
                     $query->where(' expire_time >'. (time()-86400*7));