VipUserExamMapper.xml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435
  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.vip.mapper.VipUserExamMapper">
  6. <resultMap type="VipUserExam" id="VipUserExamResult">
  7. <result property="id" column="id" />
  8. <result property="userId" column="user_id" />
  9. <result property="unionId" column="union_id" />
  10. <result property="nickName" column="nick_name" />
  11. <result property="examId" column="exam_id" />
  12. <result property="examName" column="exam_name" />
  13. <result property="expirationTime" column="expiration_time" />
  14. <result property="createTime" column="create_time" />
  15. <result property="updateTime" column="update_time" />
  16. </resultMap>
  17. <sql id="selectVipUserExamVo">
  18. select * from vip_user_exam
  19. </sql>
  20. <select id="selectVipUserExamList" parameterType="VipUserExam" resultMap="VipUserExamResult">
  21. <include refid="selectVipUserExamVo"/>
  22. <where>
  23. <if test="userId != null "> and user_id = #{userId}</if>
  24. <if test="unionId != null and unionId != ''"> and union_id = #{unionId}</if>
  25. <if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
  26. <if test="examId != null and examId != ''"> and exam_id = #{examId}</if>
  27. <if test="examName != null and examName != ''"> and exam_name like concat('%', #{examName}, '%')</if>
  28. <if test="expirationTime != null "> and expiration_time = #{expirationTime}</if>
  29. </where>
  30. </select>
  31. </mapper>