="、"<="、"like"">="、"<="、"like"" />
美文网首页
mybatis的">="、"<="、"like"

mybatis的">="、"<="、"like"

作者: 墨色尘埃 | 来源:发表于2020-01-02 15:18 被阅读0次
        <where>
            <if test="enterpriseName!=null">
                AND T.ENTERPRISE_NAME LIKE '%' #{enterpriseName,jdbcType=VARCHAR} '%'
            </if>
            <if test="startYearMonth !=null and startYearMonth !=''">
                AND <![CDATA[ T.YEARMONTH >= #{startYearMonth} ]]>
            </if>
            <if test="endYearMonth !=null and endYearMonth !=''">
                AND <![CDATA[ T.YEARMONTH <= #{endYearMonth}]]>
            </if>

            <if test="enterpriseAddress!=null">
                AND ENTERPRISE_ADDRESS LIKE CONCAT('%', #{enterpriseAddress,jdbcType=VARCHAR}, '%')
            </if>
        </where>

延伸:mybatis-plus对字段operate_time时间进行比较

相关文章

网友评论

      本文标题:mybatis的">="、"<="、"like"

      本文链接:https://www.haomeiwen.com/subject/hvlooctx.html