后台服务
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

47 řádky
1.4 KiB

  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.iformall.mapper.WxQuestionMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxQuestion">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="content" jdbcType="VARCHAR" property="content"/>
  8. </resultMap>
  9. <sql id="allColumns">
  10. `id`,`tenant_id`,`content`
  11. </sql>
  12. <sql id="dynamicWhereConditions">
  13. where 1 = 1
  14. <if test=" null != id ">
  15. and `id` = #{id}
  16. </if>
  17. <if test=" null != tenantId ">
  18. and `tenant_id` = #{tenantId}
  19. </if>
  20. <if test=" null != content ">
  21. and `content` = #{content}
  22. </if>
  23. <if test=" null != ids ">
  24. and id in
  25. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  26. #{idItem}
  27. </foreach>
  28. </if>
  29. <if test=" null != sortColumns">order by ${sortColumns}</if>
  30. </sql>
  31. <select id="findList" parameterType="com.iformall.domain.po.WxQuestion" resultMap="BaseResultMap">
  32. select
  33. <include refid="allColumns"/>
  34. from wx_question
  35. <include refid="dynamicWhereConditions"/>
  36. </select>
  37. </mapper>