YII2.0 多条件查询

   ->orderBy(
                [
                'is_top' => SORT_DESC, //置顶降序
                'is_full' => SORT_ASC, //是否报满正序
                'display_order' => SORT_ASC, //手动排序正序
                'id' => SORT_DESC, //编号排序倒序
                'case when `activity`.`status` = 30 then 0 else 1 end' => SORT_DESC, //编号排序倒序
                ]
            )


posted @ 2018-06-16 15:01  llxpbbs  阅读(711)  评论(0编辑  收藏  举报