mysql
查询:
select id,status from room where status in(0,1,3)
order by field(status,1,0,3),if(status=3,-start_time,start_time) asc;
批量更新:
update live_room set top_status=
when #{item.id} then #{item.topStatus}
set top_order=
when #{item.id} then #{item.topOrder}