$whereOrArray = [
'store_selection_ids' => '',
'exp' => Db::raw("FIND_IN_SET($business_id,store_selection_ids)")
];
$list = UserCoupon::field('id,user_id,type,name,coupon_id,threshold,reduction,overduetime,status,createtime')
->where([
'user_id' => $this->auth->id,
'status' => 0,
'type' => $goods_type,
'threshold' => ['<=', $price],
'overduetime' => ['>', time()],
])
->where(
function ($q) use ($whereOrArray) {
$q->whereOr($whereOrArray);
}
)
->order('reduction DESC')->select();
where whereor综合用法
最新推荐文章于 2024-06-15 20:21:51 发布