作者 耿培杰

修改我的优惠券接口

... ... @@ -30,7 +30,7 @@ class UserTicket extends Model
->alias('ut')
->where($where)
->whereOr(function ($query) use ($where,$price){
$query->where('user_id', $where['user_id'])->where('ut.fill_price', '<=', $price);
$query->where($where)->where('ut.fill_price', '<=', $price);
})
->count();
... ... @@ -38,7 +38,7 @@ class UserTicket extends Model
->join('fa_ticket t','ut.ticket_id=t.id')
->where($where)
->whereOr(function ($query) use ($where,$price){
$query->where('user_id', $where['user_id'])->where('ut.fill_price', '<=', $price);
$query->where($where)->where('ut.fill_price', '<=', $price);
})
->field($field)
->page($page,$limit)
... ...