DetectDetailMapper.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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.yaorong.eai.web.detect.mapper.DetectDetailMapper">
  4. <resultMap id="BaseResultMap" type="com.yaorong.eai.web.detect.vo.DetectDetail">
  5. <result column="detect_id" jdbcType="BIGINT" property="detectId"/>
  6. <result column="topic_start_time" jdbcType="TIMESTAMP" property="topicStartTime"/>
  7. <result column="topic_end_time" jdbcType="TIMESTAMP" property="topicEndTime"/>
  8. <result column="user_time" jdbcType="VARCHAR" property="userTime"/>
  9. <result column="results" jdbcType="INTEGER" property="results"/>
  10. <result column="topic_main_pic" jdbcType="VARCHAR" property="topicMainPic"/>
  11. <result column="topic_right_pic" jdbcType="VARCHAR" property="topicRightPic"/>
  12. <result column="user_chose_pic" jdbcType="VARCHAR" property="userChosePic"/>
  13. <result column="stage_level" jdbcType="VARCHAR" property="stageLevel"/>
  14. </resultMap>
  15. <insert id="insert" parameterType="com.yaorong.eai.web.detect.vo.DetectDetail">
  16. insert into ea_detect_detail (detect_id, topic_start_time, topic_end_time,
  17. user_time, results, topic_main_pic,
  18. topic_right_pic, user_chose_pic)
  19. values (#{detectId,jdbcType=BIGINT}, #{topicStartTime,jdbcType=TIMESTAMP}, #{topicEndTime,jdbcType=TIMESTAMP},
  20. #{userTime,jdbcType=TIMESTAMP}, #{results,jdbcType=INTEGER}, #{topicMainPic,jdbcType=VARCHAR},
  21. #{topicRightPic,jdbcType=VARCHAR}, #{userChosePic,jdbcType=VARCHAR})
  22. </insert>
  23. <insert id="insertSelective" parameterType="com.yaorong.eai.web.detect.vo.DetectDetail">
  24. insert into ea_detect_detail
  25. <trim prefix="(" suffix=")" suffixOverrides=",">
  26. <if test="detectId != null">
  27. detect_id,
  28. </if>
  29. <if test="topicStartTime != null">
  30. topic_start_time,
  31. </if>
  32. <if test="topicEndTime != null">
  33. topic_end_time,
  34. </if>
  35. <if test="userTime != null">
  36. user_time,
  37. </if>
  38. <if test="results != null">
  39. results,
  40. </if>
  41. <if test="topicMainPic != null">
  42. topic_main_pic,
  43. </if>
  44. <if test="topicRightPic != null">
  45. topic_right_pic,
  46. </if>
  47. <if test="userChosePic != null">
  48. user_chose_pic,
  49. </if>
  50. <if test="stageLevel != null">
  51. stage_level,
  52. </if>
  53. </trim>
  54. <trim prefix="values (" suffix=")" suffixOverrides=",">
  55. <if test="detectId != null">
  56. #{detectId,jdbcType=BIGINT},
  57. </if>
  58. <if test="topicStartTime != null">
  59. #{topicStartTime,jdbcType=TIMESTAMP},
  60. </if>
  61. <if test="topicEndTime != null">
  62. #{topicEndTime,jdbcType=TIMESTAMP},
  63. </if>
  64. <if test="userTime != null">
  65. #{userTime,jdbcType=VARCHAR},
  66. </if>
  67. <if test="results != null">
  68. #{results,jdbcType=INTEGER},
  69. </if>
  70. <if test="topicMainPic != null">
  71. #{topicMainPic,jdbcType=VARCHAR},
  72. </if>
  73. <if test="topicRightPic != null">
  74. #{topicRightPic,jdbcType=VARCHAR},
  75. </if>
  76. <if test="userChosePic != null">
  77. #{userChosePic,jdbcType=VARCHAR},
  78. </if>
  79. <if test="stageLevel != null">
  80. #{stageLevel,jdbcType=VARCHAR},
  81. </if>
  82. </trim>
  83. </insert>
  84. </mapper>