Kirin 2 năm trước cách đây
mục cha
commit
2605331662
1 tập tin đã thay đổi với 11 bổ sung0 xóa
  1. 11 0
      app/models/store/StoreCouponUser.php

+ 11 - 0
app/models/store/StoreCouponUser.php

@@ -136,6 +136,17 @@ class StoreCouponUser extends BaseModel
             $cateId = array_merge($cateId, $temp);
             $cateId = array_unique($cateId);
             foreach ($cateId as $value) {
+                @file_put_contents('test.txt',$model->alias('a')
+                    ->join('store_coupon b', 'b.id=a.cid')
+                    ->where('a.uid', $uid)
+                    ->where('a.is_fail', 0)
+                    ->where('a.status', 0)
+                    ->where('a.use_min_price', '<=', $_price)
+                    ->whereFindinSet('b.category_id', $value)
+                    ->where('b.type', 1)
+                    ->field('a.*,b.type')
+                    ->order('a.coupon_price', 'DESC')->fetchSql()
+                    ->select());
                 $lst2[] = $model->alias('a')
                     ->join('store_coupon b', 'b.id=a.cid')
                     ->where('a.uid', $uid)