<if test="c.type==3 and c.type!=null and c.type!=''">
ORDER BY (
case
when socialSecurity=0 then 3
when socialSecurity>=1 then 2
when socialSecurity =-1 then 1
else '0'
end
)DESC
</if>
case when socialSecurity=0 then 3 else ‘0’ end from
类似于三元运算符
socialSecurity=0 ?3:‘0’
或者:
if( socialSecurity=0){
socialSecurity=3
}else{
socialSecurity=‘0’
}