关闭

Mapper条件查询整数类型判断

瞎溜达 1年前 ⋅ 780 阅读
<if test="contact != null">
    <if test="contact == 1">
        AND (contacts_phone is not NULL or contacts_wx is not NULL)
    </if>
    <if test="contact == 2">
        AND contacts_phone is NULL AND contacts_wx is NULL
    </if>
</if>

全部评论: 0

    我有话说: