Warning2Mapper.xml 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  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.Warning2Mapper">
  4. <select id="pageQueryAll" parameterType="java.util.Map" resultType="com.gyee.wisdom.alarm.sharding.entity.Warning2">
  5. select * from WARNING2 a
  6. <where>
  7. 1=1
  8. <if test="modelId !=null and modelId !=''">
  9. and a.MODELID like '%${modelId}%'
  10. </if>
  11. <if test="name !=null and name !=''">
  12. and a.CHINESETEXT like '%${name}%'
  13. </if>
  14. <if test="isLeaf !=null and isLeaf !=''">
  15. and a.ISLEAF = #{isLeaf}
  16. </if>
  17. </where>
  18. </select>
  19. <select id="getMaxIdByModelId" parameterType="java.util.Map" resultType="java.lang.String">
  20. select Max(ID) from WARNING2 a
  21. <where>
  22. 1=1
  23. <if test="modelId !=null and modelId !=''">
  24. and a.ID like '%${modelId}%'
  25. </if>
  26. </where>
  27. </select>
  28. <select id="selectGroupType" resultType="java.lang.String">
  29. select warningtypeid as type from warning2 group by warningtypeid
  30. </select>
  31. </mapper>