Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

72 righe
2.3 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.WxQuestionLogMapper">
  4. <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxQuestionLog">
  5. <id column="id" jdbcType="BIGINT" property="id"/>
  6. <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
  7. <result column="user_id" jdbcType="BIGINT" property="userId"/>
  8. <result column="question_id" jdbcType="BIGINT" property="questionId"/>
  9. <result column="answer" jdbcType="VARCHAR" property="answer"/>
  10. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  11. <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
  12. </resultMap>
  13. <sql id="allColumns">
  14. `id`,`tenant_id`,`user_id`,`question_id`,`answer`,`create_time`,`update_time`
  15. </sql>
  16. <sql id="dynamicWhereConditions">
  17. where 1 = 1
  18. <if test=" null != id ">
  19. and `id` = #{id}
  20. </if>
  21. <if test=" null != tenantId ">
  22. and `tenant_id` = #{tenantId}
  23. </if>
  24. <if test=" null != userId ">
  25. and `user_id` = #{userId}
  26. </if>
  27. <if test=" null != questionId ">
  28. and `question_id` = #{questionId}
  29. </if>
  30. <if test=" null != tenantId ">
  31. and `tenant_id` = #{tenantId}
  32. </if>
  33. <if test=" null != answer ">
  34. and `answer` = #{answer}
  35. </if>
  36. <if test=" null != createTime ">
  37. and `create_time` = #{createTime}
  38. </if>
  39. <if test=" null != updateTime ">
  40. and `update_time` = #{updateTime}
  41. </if>
  42. <if test=" null != ids ">
  43. and id in
  44. <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
  45. #{idItem}
  46. </foreach>
  47. </if>
  48. <if test=" null != sortColumns">order by ${sortColumns}</if>
  49. </sql>
  50. <select id="findListWithAnswer" parameterType="com.iformall.domain.po.WxQuestionLog" resultMap="BaseResultMap">
  51. select
  52. <include refid="allColumns"/>
  53. from wx_question_log
  54. <include refid="dynamicWhereConditions"/>
  55. and `answer` is not null
  56. </select>
  57. </mapper>