QuestionWrongMapper.xml 1.2 KB

1234567891011121314151617181920212223242526272829
  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.QuestionWrongMapper">
  6. <resultMap type="QuestionWrong" id="QuestionWrongResult">
  7. <result property="id" column="id" />
  8. <result property="userId" column="user_id" />
  9. <result property="questionId" column="question_id" />
  10. <result property="createTime" column="create_time" />
  11. <result property="updateTime" column="update_time" />
  12. </resultMap>
  13. <sql id="selectQuestionWrongVo">
  14. select * from question_wrong
  15. </sql>
  16. <select id="selectQuestionWrongList" parameterType="QuestionWrong" resultMap="QuestionWrongResult">
  17. <include refid="selectQuestionWrongVo"/>
  18. <where>
  19. <if test="userId != null and userId !='' "> and user_id = #{userId}</if>
  20. <if test="questionId != null and questionId != '' "> and question_id = #{questionId}</if>
  21. <if test="km != null and km!='' "> and km = #{km}</if>
  22. <if test="carType != null and carType !='' "> and car_type = #{carType}</if>
  23. </where>
  24. </select>
  25. </mapper>