Kirin 2 年之前
父节点
当前提交
2605331662
共有 1 个文件被更改,包括 11 次插入0 次删除
  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)