->where( function ($query) use ($nowTime) { $query->where("sp.expired_date", ‘>‘, $nowTime)->whereOr("sp.expired_date", 0); } )
, case when gc.take_time > ‘ .$nowTime . ‘ and (sp.expired_date > ‘. $nowTime. ‘ or sp.expired_date = 0) then 1 else 0 end as can_take"
case when 语句