首页 > 代码库 > MyBatis Like
MyBatis Like
MySQL:
<select id="listByPidsLikeName" resultType="com.xdt.ibs.environ.device.bean.Environ"> SELECT id,pid,logicid,`name`,`type`,ip_addr AS ipAddr,`port`,modbus_addr AS modbusAddr,pm25_h AS pm25H,
pm10_h AS pm10H,temp_h AS tempH,humi_h AS humiH,co2_h AS co2H,tvoc_h AS tvocH,conn_status AS connStatus,
update_time AS updateTime,create_time AS createTime FROM environ WHERE pid IN <foreach collection="list" index="index" item="item" open="(" separator="," close=")"> #{item} </foreach> <if test="name != null and name != ‘‘"> AND `name` like CONCAT(‘%‘,#{name},‘%‘) </if> </select>
啦啦啦
MyBatis Like
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。