|
@@ -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)
|