방법 1 order by 뒤에 case when
방법 2 trim prefix="ORDER BY"
<trim prefix="ORDER BY"> <if test="order == 0"> ATW.reg_dt DESC </if> <if test="order == 1"> A.count_like DESC </if> </trim>