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>

啦啦啦

相关文章:

  • 2022-12-23
  • 2021-09-23
  • 2021-08-08
  • 2021-09-30
猜你喜欢
  • 2021-07-01
  • 2022-03-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案