RemoteDegreeMapper.xml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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.platform.dao.mapper.remote.RemoteDegreeMapper">
  4. <sql id="Base_Column_List">
  5. degree
  6. .
  7. id
  8. ,
  9. degree.sb_id,
  10. degree.sb_name,
  11. degree.position_num,
  12. degree.line,
  13. degree.type,
  14. degree.description,
  15. degree.result,
  16. degree.ratio,
  17. degree.unit,
  18. degree.remark,
  19. degree.created_user_id,
  20. degree.update_user_id,
  21. degree.created_time,
  22. degree.update_time
  23. </sql>
  24. <sql id="Ref_Column_List">
  25. degree
  26. .
  27. sb_id
  28. ,
  29. degree.sb_name,
  30. degree.position_num,
  31. degree.line,
  32. degree.type,
  33. degree.description,
  34. degree.result,
  35. degree.ratio,
  36. degree.unit,
  37. degree.remark,
  38. </sql>
  39. <sql id="List_Condition">
  40. <if test="id != null and id != ''">
  41. and degree.id = #{id}
  42. </if>
  43. <if test="sbId != null and sbId != ''">
  44. and degree.sb_id = #{sbId}
  45. </if>
  46. <if test="sbName != null and sbName != ''">
  47. and degree.sb_name = #{sbName}
  48. </if>
  49. <if test="positionNum != null">
  50. and degree.position_num = #{positionNum}
  51. </if>
  52. <if test="line != null">
  53. and degree.line = #{line}
  54. </if>
  55. <if test="type != null">
  56. and degree.type = #{type}
  57. </if>
  58. <if test="description != null and description != ''">
  59. and degree.description = #{description}
  60. </if>
  61. <if test="result != null and result != ''">
  62. and degree.result = #{result}
  63. </if>
  64. <if test="ratio != null">
  65. and degree.ratio = #{ratio}
  66. </if>
  67. <if test="unit != null and unit != ''">
  68. and degree.unit = #{unit}
  69. </if>
  70. <if test="remark != null and remark != ''">
  71. and degree.remark = #{remark}
  72. </if>
  73. <if test="createdUserId != null and createdUserId != ''">
  74. and degree.created_user_id = #{createdUserId}
  75. </if>
  76. <if test="updateUserId != null and updateUserId != ''">
  77. and degree.update_user_id = #{updateUserId}
  78. </if>
  79. <if test="createdTimeStart != null">
  80. and degree.created_time <![CDATA[>=]]>; #{createdTimeStart}
  81. </if>
  82. <if test="createdTimeEnd != null">
  83. and degree.created_time <![CDATA[<=]]> #{createdTimeEnd}
  84. </if>
  85. <if test="createdTime != null">
  86. and degree.created_time = #{createdTime}
  87. </if>
  88. <if test="updateTimeStart != null">
  89. and degree.update_time <![CDATA[>=]]>; #{updateTimeStart}
  90. </if>
  91. <if test="updateTimeEnd != null">
  92. and degree.update_time <![CDATA[<=]]> #{updateTimeEnd}
  93. </if>
  94. <if test="updateTime != null">
  95. and degree.update_time = #{updateTime}
  96. </if>
  97. <if test="keyword != null and keyword != ''">
  98. and (
  99. degree.id like concat(concat('%',#{keyword}),'%')
  100. or degree.position_num like concat(concat('%',#{keyword}),'%')
  101. }
  102. </if>
  103. </sql>
  104. <select id="selectList" parameterType="com.platform.dao.dto.remote.RemoteDegreeDTO"
  105. resultType="com.platform.dao.vo.query.remote.RemoteDegreeVO">
  106. select degree.*, sbInfo.name sbName, sbInfo.no sbNo
  107. from t_remote_degree as degree
  108. left join t_sb_info sbInfo on degree.sb_id = sbInfo.id
  109. <where>
  110. <include refid="List_Condition"/>
  111. </where>
  112. </select>
  113. </mapper>