zoukankan      html  css  js  c++  java
  • 【mybatis】mybatis中 <if test=>等于的条件怎么写

    常在mybatis中使用<if test="aa != '值'  ">的话 怎么怎么样

    那么等于怎么写呢?

    注意 要想使用 ==   仅仅需要将双引号和单引号的位置换一下即可!!! 

            

    复制代码
    <update id="updateGoodsShelf" parameterType="java.lang.String">
            update
            integral_goods
            set
            <if test='shelfFlag == "1"'>
                shelf_flag = ${@com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoods@SHELF_ON}
            </if>
            <if test='shelfFlag == "0"'>
                shelf_flag = ${@com.pisen.cloud.luna.ms.jifen.base.domain.IntegralGoods@SHELF_OFF}
            </if>
            where
            uid
            IN
            <foreach collection="list" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
        </update>
    复制代码
  • 相关阅读:
    Markdown学习
    二叉树的最近公共祖先
    javaCompiler简析
    自定义类加载器
    聚合和组合的区别
    拓扑排序
    C++ map和unordered_map
    静态文件加载路径
    文件上传
    jackson
  • 原文地址:https://www.cnblogs.com/telwanggs/p/11026636.html
Copyright © 2011-2022 走看看