今天写群组推荐接口,要求未满的群 ( 群最大人数字段maxusers, 群人数字段affiliations_count 都在群组表中),官方,热门(普通群0 ,官方1,热门2 ) 排序的群
->whereRaw(\'affiliations_count
->orderByRaw("FIELD(group_level, " . implode(", ", [1, 2, 0]) . ")")
->whereIn(\'id\',$result)
->orderByRaw("FIELD(id, " . implode(", ", $result) . ")")