AttJskejianEcofrdBaseDao.xml 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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="cn.com.goldenwater.dcproj.dao.AttJskejianEcofrdBaseDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttJskejianEcofrdBase" id="attJskejianEcofrdBaseResultMap">
  5. <result property="centerY" column="CENTER_Y"/>
  6. <result property="gdX" column="GD_X"/>
  7. <result property="gdY" column="GD_Y"/>
  8. <result property="reportContent" column="REPORT_CONTENT"/>
  9. <result property="biz" column="BIZ"/>
  10. <result property="hostUnit" column="HOST_UNIT"/>
  11. <result property="sptUnit" column="SPT_UNIT"/>
  12. <result property="invstVfctn" column="INVST_VFCTN"/>
  13. <result property="trtmtRctftn" column="TRTMT_RCTFTN"/>
  14. <result property="opinion" column="OPINION"/>
  15. <result property="office" column="OFFICE"/>
  16. <result property="isOver" column="IS_OVER"/>
  17. <result property="persId" column="PERS_ID"/>
  18. <result property="intm" column="INTM"/>
  19. <result property="uptm" column="UPTM"/>
  20. <result property="id" column="ID"/>
  21. <result property="accepNum" column="ACCEP_NUM"/>
  22. <result property="assignNum" column="ASSIGN_NUM"/>
  23. <result property="adCode" column="AD_CODE"/>
  24. <result property="adName" column="AD_NAME"/>
  25. <result property="location" column="LOCATION"/>
  26. <result property="centerX" column="CENTER_X"/>
  27. </resultMap>
  28. <sql id="table_columns">
  29. CENTER_Y,
  30. GD_X,
  31. GD_Y,
  32. REPORT_CONTENT,
  33. BIZ,
  34. HOST_UNIT,
  35. SPT_UNIT,
  36. INVST_VFCTN,
  37. TRTMT_RCTFTN,
  38. OPINION,
  39. OFFICE,
  40. IS_OVER,
  41. PERS_ID,
  42. INTM,
  43. UPTM,
  44. ID,
  45. ACCEP_NUM,
  46. ASSIGN_NUM,
  47. AD_CODE,
  48. AD_NAME,
  49. LOCATION,
  50. CENTER_X
  51. </sql>
  52. <sql id="entity_properties">
  53. #{centerY},
  54. #{gdX},
  55. #{gdY},
  56. #{reportContent},
  57. #{biz},
  58. #{hostUnit},
  59. #{sptUnit},
  60. #{invstVfctn},
  61. #{trtmtRctftn},
  62. #{opinion},
  63. #{office},
  64. #{isOver},
  65. #{persId},
  66. #{intm},
  67. #{uptm},
  68. #{id},
  69. #{accepNum},
  70. #{assignNum},
  71. #{adCode},
  72. #{adName},
  73. #{location},
  74. #{centerX}
  75. </sql>
  76. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  77. <sql id="page_where">
  78. <trim prefix="where" prefixOverrides="and | or ">
  79. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  80. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  81. <if test="reportContent != null and reportContent != ''">and REPORT_CONTENT = #{reportContent}</if>
  82. <if test="biz != null and biz != ''">and BIZ = #{biz}</if>
  83. <if test="hostUnit != null and hostUnit != ''">and HOST_UNIT = #{hostUnit}</if>
  84. <if test="sptUnit != null and sptUnit != ''">and SPT_UNIT = #{sptUnit}</if>
  85. <if test="invstVfctn != null and invstVfctn != ''">and INVST_VFCTN = #{invstVfctn}</if>
  86. <if test="trtmtRctftn != null and trtmtRctftn != ''">and TRTMT_RCTFTN = #{trtmtRctftn}</if>
  87. <if test="opinion != null and opinion != ''">and OPINION = #{opinion}</if>
  88. <if test="office != null and office != ''">and OFFICE = #{office}</if>
  89. <if test="isOver != null and isOver != ''">and IS_OVER = #{isOver}</if>
  90. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  91. <if test="intm != null">and INTM = #{intm}</if>
  92. <if test="uptm != null">and UPTM = #{uptm}</if>
  93. <if test="id != null and id != ''">and ID = #{id}</if>
  94. <if test="accepNum != null and accepNum != ''">and ACCEP_NUM = #{accepNum}</if>
  95. <if test="assignNum != null and assignNum != ''">and ASSIGN_NUM = #{assignNum}</if>
  96. <if test="adCode != null and adCode != ''">and AD_CODE like '${adCode}%'</if>
  97. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  98. <if test="location != null and location != ''">and LOCATION = #{location}</if>
  99. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  100. </trim>
  101. </sql>
  102. <select id="get" resultMap="attJskejianEcofrdBaseResultMap" parameterType="String" >
  103. select <include refid="table_columns" /> from ATT_JSKEJIAN_ECOFRD_BASE where ID = #{id}
  104. </select>
  105. <select id="getBy" resultMap="attJskejianEcofrdBaseResultMap">
  106. select <include refid="table_columns" /> from ATT_JSKEJIAN_ECOFRD_BASE <include refid="page_where" />
  107. </select>
  108. <select id="findAll" resultMap="attJskejianEcofrdBaseResultMap">
  109. select <include refid="table_columns" /> from ATT_JSKEJIAN_ECOFRD_BASE
  110. </select>
  111. <select id="findList" resultMap="attJskejianEcofrdBaseResultMap">
  112. select <include refid="table_columns" /> from ATT_JSKEJIAN_ECOFRD_BASE <include refid="page_where" />
  113. </select>
  114. <select id="selectCount" resultType="int" >
  115. select count(ID) from ATT_JSKEJIAN_ECOFRD_BASE <include refid="page_where" />
  116. </select>
  117. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttJskejianEcofrdBase">
  118. insert into ATT_JSKEJIAN_ECOFRD_BASE( <include refid="table_columns" /> )
  119. values ( <include refid="entity_properties" /> )
  120. </insert>
  121. <delete id="delete" parameterType="java.lang.String">
  122. delete from ATT_JSKEJIAN_ECOFRD_BASE where ID = #{id}
  123. </delete>
  124. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttJskejianEcofrdBase">
  125. delete from ATT_JSKEJIAN_ECOFRD_BASE <include refid="page_where" />
  126. </delete>
  127. <update id="deleteInFlag" parameterType="java.lang.String">
  128. update ATT_JSKEJIAN_ECOFRD_BASE set flag_valid = 0 where ID = #{id}
  129. </update>
  130. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttJskejianEcofrdBase">
  131. update ATT_JSKEJIAN_ECOFRD_BASE
  132. <trim prefix="set" suffixOverrides=",">
  133. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  134. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  135. <if test="reportContent != null and reportContent != ''">REPORT_CONTENT = #{reportContent},</if>
  136. <if test="biz != null and biz != ''">BIZ = #{biz},</if>
  137. <if test="hostUnit != null and hostUnit != ''">HOST_UNIT = #{hostUnit},</if>
  138. <if test="sptUnit != null and sptUnit != ''">SPT_UNIT = #{sptUnit},</if>
  139. <if test="invstVfctn != null and invstVfctn != ''">INVST_VFCTN = #{invstVfctn},</if>
  140. <if test="trtmtRctftn != null and trtmtRctftn != ''">TRTMT_RCTFTN = #{trtmtRctftn},</if>
  141. <if test="opinion != null and opinion != ''">OPINION = #{opinion},</if>
  142. <if test="office != null and office != ''">OFFICE = #{office},</if>
  143. <if test="isOver != null and isOver != ''">IS_OVER = #{isOver},</if>
  144. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  145. <if test="intm != null">INTM = #{intm},</if>
  146. <if test="uptm != null">UPTM = #{uptm},</if>
  147. <if test="id != null and id != ''">ID = #{id},</if>
  148. <if test="accepNum != null and accepNum != ''">ACCEP_NUM = #{accepNum},</if>
  149. <if test="assignNum != null and assignNum != ''">ASSIGN_NUM = #{assignNum},</if>
  150. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  151. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  152. <if test="location != null and location != ''">LOCATION = #{location},</if>
  153. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  154. </trim>
  155. <where>ID = #{id}</where>
  156. </update>
  157. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttJskejianEcofrdBase">
  158. update ATT_JSKEJIAN_ECOFRD_BASE
  159. <trim prefix="set" suffixOverrides=",">
  160. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  161. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  162. <if test="reportContent != null and reportContent != ''">REPORT_CONTENT = #{reportContent},</if>
  163. <if test="biz != null and biz != ''">BIZ = #{biz},</if>
  164. <if test="hostUnit != null and hostUnit != ''">HOST_UNIT = #{hostUnit},</if>
  165. <if test="sptUnit != null and sptUnit != ''">SPT_UNIT = #{sptUnit},</if>
  166. <if test="invstVfctn != null and invstVfctn != ''">INVST_VFCTN = #{invstVfctn},</if>
  167. <if test="trtmtRctftn != null and trtmtRctftn != ''">TRTMT_RCTFTN = #{trtmtRctftn},</if>
  168. <if test="opinion != null and opinion != ''">OPINION = #{opinion},</if>
  169. <if test="office != null and office != ''">OFFICE = #{office},</if>
  170. <if test="isOver != null and isOver != ''">IS_OVER = #{isOver},</if>
  171. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  172. <if test="intm != null">INTM = #{intm},</if>
  173. <if test="uptm != null">UPTM = #{uptm},</if>
  174. <if test="id != null and id != ''">ID = #{id},</if>
  175. <if test="accepNum != null and accepNum != ''">ACCEP_NUM = #{accepNum},</if>
  176. <if test="assignNum != null and assignNum != ''">ASSIGN_NUM = #{assignNum},</if>
  177. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  178. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  179. <if test="location != null and location != ''">LOCATION = #{location},</if>
  180. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  181. </trim>
  182. <include refid="page_where" />
  183. </update>
  184. <!-- 其他自定义SQL -->
  185. </mapper>