1557492053 1 vuosi sitten
vanhempi
commit
216db359d4
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4 4
      application/api/model/user/Voucher.php

+ 4 - 4
application/api/model/user/Voucher.php

@@ -73,13 +73,13 @@ class Voucher extends BaseModel
 
     public function fetchVoucher($user_id, $status, $page = 1, $size = 10)
     {
-        return $this->alias("uv")
+        return $this
             ->with("voucherinfo")
             ->where([
-                "uv.user_id" => $user_id,
+                "user_id" => $user_id,
             ])
-            ->where("uv.status", "<>", \E_VOUCHER_STATUS::Use)
-            ->where("uv.status", "in", $status)
+            ->where("status", "<>", \E_VOUCHER_STATUS::Use)
+            ->where("status", "in", $status)
             ->page($page)
             ->paginate($size);
     }