QuestionInfoMapper.xml 5.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.miaxis.question.mapper.QuestionInfoMapper">
  6. <resultMap type="QuestionInfo" id="QuestionInfoResult">
  7. <result property="id" column="id" />
  8. <result property="type" column="type" />
  9. <result property="intNumber" column="int_number" />
  10. <result property="strTppe" column="str_tppe" />
  11. <result property="strTypeL" column="str_type_l" />
  12. <result property="licenseType" column="license_type" />
  13. <result property="question" column="question" />
  14. <result property="an1" column="an1" />
  15. <result property="an2" column="an2" />
  16. <result property="an3" column="an3" />
  17. <result property="an4" column="an4" />
  18. <result property="an5" column="an5" />
  19. <result property="an6" column="an6" />
  20. <result property="an7" column="an7" />
  21. <result property="answerTrue" column="answer_true" />
  22. <result property="explain1" column="explain1" />
  23. <result property="bestAnswerId" column="best_answer_id" />
  24. <result property="kemu" column="kemu" />
  25. <result property="jieshiFrom" column="jieshi_from" />
  26. <result property="moretypes" column="moretypes" />
  27. <result property="chapterid" column="chapterid" />
  28. <result property="sinaimg" column="sinaimg" />
  29. <result property="videoUrl" column="video_url" />
  30. <result property="diffDegree" column="diff_degree" />
  31. <result property="cityid" column="cityid" />
  32. <result property="gs" column="gs" />
  33. <result property="keyword" column="keyword" />
  34. <result property="errorRate" column="error_rate" />
  35. <result property="mediaUrl" column="media_url" />
  36. <result property="showOptionType" column="show_option_type" />
  37. </resultMap>
  38. <sql id="selectQuestionInfoVo">
  39. select id, type, int_number, str_tppe, str_type_l, license_type, question, an1, an2, an3, an4, an5, an6, an7, answer_true, explain1, best_answer_id, kemu, jieshi_from, moretypes, chapterid, sinaimg, video_url, diff_degree, cityid, gs, keyword, error_rate, media_url, show_option_type from question_info
  40. </sql>
  41. <select id="selectQuestionInfoList" parameterType="QuestionInfo" resultMap="QuestionInfoResult">
  42. <include refid="selectQuestionInfoVo"/>
  43. <where>
  44. <if test="id != null "> and id = #{id}</if>
  45. <if test="type != null "> and type = #{type}</if>
  46. <if test="intNumber != null and intNumber != ''"> and int_number = #{intNumber}</if>
  47. <if test="strTppe != null and strTppe != ''"> and str_tppe = #{strTppe}</if>
  48. <if test="strTypeL != null and strTypeL != ''"> and str_type_l = #{strTypeL}</if>
  49. <if test="licenseType != null and licenseType != ''"> and license_type = #{licenseType}</if>
  50. <if test="question != null and question != ''"> and question = #{question}</if>
  51. <if test="an1 != null and an1 != ''"> and an1 = #{an1}</if>
  52. <if test="an2 != null and an2 != ''"> and an2 = #{an2}</if>
  53. <if test="an3 != null and an3 != ''"> and an3 = #{an3}</if>
  54. <if test="an4 != null and an4 != ''"> and an4 = #{an4}</if>
  55. <if test="an5 != null and an5 != ''"> and an5 = #{an5}</if>
  56. <if test="an6 != null and an6 != ''"> and an6 = #{an6}</if>
  57. <if test="an7 != null and an7 != ''"> and an7 = #{an7}</if>
  58. <if test="answerTrue != null and answerTrue != ''"> and answer_true = #{answerTrue}</if>
  59. <if test="explain1 != null and explain1 != ''"> and explain1 = #{explain1}</if>
  60. <if test="bestAnswerId != null and bestAnswerId != ''"> and best_answer_id = #{bestAnswerId}</if>
  61. <if test="kemu != null "> and kemu = #{kemu}</if>
  62. <if test="jieshiFrom != null and jieshiFrom != ''"> and jieshi_from = #{jieshiFrom}</if>
  63. <if test="moretypes != null and moretypes != ''"> and moretypes = #{moretypes}</if>
  64. <if test="chapterid != null "> and chapterid = #{chapterid}</if>
  65. <if test="sinaimg != null and sinaimg != ''"> and sinaimg = #{sinaimg}</if>
  66. <if test="videoUrl != null and videoUrl != ''"> and video_url = #{videoUrl}</if>
  67. <if test="diffDegree != null "> and diff_degree = #{diffDegree}</if>
  68. <if test="cityid != null "> and cityid = #{cityid}</if>
  69. <if test="gs != null and gs != ''"> and gs = #{gs}</if>
  70. <if test="keyword != null and keyword != ''"> and keyword = #{keyword}</if>
  71. <if test="errorRate != null "> and error_rate = #{errorRate}</if>
  72. <if test="mediaUrl != null and mediaUrl != ''"> and media_url = #{mediaUrl}</if>
  73. <if test="showOptionType != null "> and show_option_type = #{showOptionType}</if>
  74. </where>
  75. </select>
  76. </mapper>