wugg 4 months ago
parent
commit
c867b3dbc2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/youzan/controller/Voucher.php

+ 2 - 2
app/youzan/controller/Voucher.php

@@ -20,8 +20,8 @@ class Voucher extends Base{
             	'status'=>0,
             	'size'=>10
         	]);
-        if(!empty($params['activity_types'])) $where['activity_type'] = ['in',$params['activity_types']];
-        if($params['status']!=0) $where['status'] = $params['status']==4?["in",[1,2]]:$params['status'];
+        if(!empty($params['activity_types'])) $where[] = ["activity_type",'in',$params['activity_types']];
+        if($params['status']!=0) $where[] = $params['status']==4?["status","in",[1,2]]:['status','=',$params['status']];
         $list = Promocode::where($where)->paginate(["list_rows"=>$params['size'],"page"=>$params['page']]);
         return success('SUCCESS',['list'=>$list->items(),'total'=>$list->total()]);
     }