码迷,mamicode.com
首页 > 其他好文 > 详细

mybatis

时间:2019-02-15 17:32:23      阅读:210      评论:0      收藏:0      [点我收藏+]

标签:raid   cti   collect   size   inf   arm   select   bsp   rar   

1.id in ids (数组)

SELECT
   *
  FROM
   `cw_alarm_info`
  <where>
   <if test="beginTime != null and beginTime!= ‘‘ and endTime != null and endTime != ‘‘">
    createTime BETWEEN #{beginTime} AND #{endTime}
   </if>
   <if test="minSim != null and minSim != ‘‘ and maxSim != null and maxSim != ‘‘">
    AND similiar BETWEEN #{minSim} AND #{maxSim}
   </if>
   <if test="cameraId != null and cameraId != ‘‘">
    AND cameraId = #{cameraId}
   </if>
   <if test="libraryIds != null and libraryIds.size > 0 ">
    AND libraryId in
    <foreach collection="libraryIds" index="index" item="item" open="(" separator="," close=")">
                #{item}
             </foreach>
            </if>
   <if test="controllerNO != null and controllerNO != ‘‘">
    AND controllerNO = #{controllerNO}
   </if>
  </where>

mybatis

标签:raid   cti   collect   size   inf   arm   select   bsp   rar   

原文地址:https://www.cnblogs.com/jinnian18sui/p/10384829.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!