InstrumentMapper.xml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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.yonge.cooleshow.biz.dal.dao.InstrumentDao">
  4. <!-- 表字段 -->
  5. <sql id="baseColumns">
  6. t.id_ AS id
  7. , t.subject_id_ AS subjectId
  8. , t.orientation_ AS orientation
  9. , t.del_flag_ AS delFlag
  10. , t.enable_flag_ AS enableFlag
  11. , t.create_time_ AS createTime
  12. , t.update_time_ AS updateTime
  13. , t.operator_ AS operator
  14. </sql>
  15. <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.wrapper.InstrumentWrapper$Instrument">
  16. SELECT
  17. <include refid="baseColumns" />
  18. FROM instrument t
  19. <where>
  20. <if test="param.subjectId != null">
  21. AND t.subject_id_ = #{param.subjectId}
  22. </if>
  23. <if test="param.subjectIds != null and param.subjectIds.size() != 0">
  24. AND t.subject_id_ in
  25. <foreach collection="param.subjectIds" item="item" separator="," open="(" close=")">
  26. #{item}
  27. </foreach>
  28. </if>
  29. <if test="param.enableFlag != null">
  30. AND t.enable_flag_ = #{param.enableFlag}
  31. </if>
  32. </where>
  33. </select>
  34. </mapper>