TestingPointAIMapper.xml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.gyee.wisdom.alarm.sharding.mapper.TestingPointAIMapper">
  4. <select id="selectByStationAndModel" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.sharding.entity.TestingPointAI" >
  5. select * from testingpointai2 a
  6. <where>
  7. 1=1
  8. <if test="station !=null and station !=''">
  9. and a.modelid like '%${station}%'
  10. </if>
  11. <if test="modelId !=null and modelId !=''">
  12. and a.model like '%${modelId}%'
  13. </if>
  14. </where>
  15. </select>
  16. <select id="selectByUniformCodeAndModel" parameterType="java.util.Map"
  17. resultType="com.gyee.wisdom.alarm.sharding.entity.TestingPointAI">
  18. select * from testingpointai2 a
  19. <where>
  20. 1=1
  21. <if test="uniformcodeList !=null and uniformcodeList.size > 0 ">
  22. and a.uniformcode in
  23. <foreach collection="uniformcodeList" item="uniformcode" index="index" open="(" close=")" separator=",">
  24. #{uniformcode}
  25. </foreach>
  26. </if>
  27. <if test="modelId !=null and modelId !=''">
  28. and a.model=#{modelId}
  29. </if>
  30. <if test="stationSimpleName !=null and stationSimpleName !=''">
  31. and a.modelid like '%${stationSimpleName}'
  32. </if>
  33. </where>
  34. </select>
  35. </mapper>