sql server if else
case when aa IS NULL then '未确认' else '已确认' end status
SELECT
CASE 1
WHEN 1 THEN '字段的值是1'
WHEN 2 THEN '字段的值是2'
ELSE '字段的值3'
END
FROM
Table
mabatis
<choose>
<when test="params.**!=null">
and a.**in
<foreach collection="params.***" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</when>
<when test="params.**!=null and params.**!='' ">
and a.**= #{params.**}
</when>
<otherwise>
and a.**<> 0
</otherwise>
</choose>
<choose>
<when test="**.**!=null and **.**!='' and **.**=='1'.**()">
***********************
</when>
<when test="**.***!=null and **.**!='' and **.**=='0'.**">
***********************
</when>
</choose>