TacPawpBstocmTsopbfpSctnDao.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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.TacPawpBstocmTsopbfpSctnDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.TacPawpBstocmTsopbfpSctn" id="tacPawpBstocmTsopbfpSctnResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="tsopbfpId" column="TSOPBFP_ID"/>
  7. <result property="sctnName" column="SCTN_NAME"/>
  8. <result property="biddingType" column="BIDDING_TYPE"/>
  9. <result property="agncy" column="AGNCY"/>
  10. <result property="bidUnit" column="BID_UNIT"/>
  11. <result property="cdtlLevl" column="CDTL_LEVL"/>
  12. <result property="bidCost" column="BID_COST"/>
  13. <result property="isWps" column="IS_WPS"/>
  14. <result property="isRbb" column="IS_RBB"/>
  15. <result property="isStabsr" column="IS_STABSR"/>
  16. <result property="note" column="NOTE"/>
  17. <result property="persId" column="PERS_ID"/>
  18. <result property="intm" column="INTM"/>
  19. <result property="uptm" column="UPTM"/>
  20. <result property="dataStat" column="DATA_STAT"/>
  21. <result property="sctnType" column="SCTN_TYPE"/>
  22. </resultMap>
  23. <sql id="table_columns">
  24. ID,SCTN_TYPE,
  25. TSOPBFP_ID,
  26. SCTN_NAME,
  27. BIDDING_TYPE,
  28. AGNCY,
  29. BID_UNIT,
  30. CDTL_LEVL,
  31. BID_COST,
  32. IS_WPS,
  33. IS_RBB,
  34. IS_STABSR,
  35. NOTE,
  36. PERS_ID,
  37. INTM,
  38. UPTM,
  39. DATA_STAT
  40. </sql>
  41. <sql id="entity_properties">
  42. #{id},#{sctnType},
  43. #{tsopbfpId},
  44. #{sctnName},
  45. #{biddingType},
  46. #{agncy},
  47. #{bidUnit},
  48. #{cdtlLevl},
  49. #{bidCost},
  50. #{isWps},
  51. #{isRbb},
  52. #{isStabsr},
  53. #{note},
  54. #{persId},
  55. #{intm},
  56. #{uptm},
  57. #{dataStat}
  58. </sql>
  59. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  60. <sql id="page_where">
  61. <trim prefix="where" prefixOverrides="and | or ">
  62. <if test="tsopbfpId != null and tsopbfpId != ''">and TSOPBFP_ID = #{tsopbfpId}</if>
  63. <if test="sctnName != null and sctnName != ''">and SCTN_NAME like '%${sctnName}%'</if>
  64. <if test="sctnType != null and sctnType != ''">and SCTN_TYPE = #{sctnType}</if>
  65. <if test="biddingType != null and biddingType != ''">and BIDDING_TYPE = #{biddingType}</if>
  66. <if test="agncy != null and agncy != ''">and AGNCY like '%${agncy}%'</if>
  67. <if test="bidUnit != null and bidUnit != ''">and BID_UNIT like '%${bidUnit}%'</if>
  68. <if test="cdtlLevl != null and cdtlLevl != ''">and CDTL_LEVL = #{cdtlLevl}</if>
  69. <if test="bidCost != null and bidCost != ''">and BID_COST = #{bidCost}</if>
  70. <if test="isWps != null and isWps != ''">and IS_WPS = #{isWps}</if>
  71. <if test="isRbb != null and isRbb != ''">and IS_RBB = #{isRbb}</if>
  72. <if test="isStabsr != null and isStabsr != ''">and IS_STABSR = #{isStabsr}</if>
  73. <if test="note != null and note != ''">and NOTE like '%${note}%'</if>
  74. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  75. <if test="intm != null">and INTM = #{intm}</if>
  76. <if test="uptm != null">and UPTM = #{uptm}</if>
  77. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  78. </trim>
  79. </sql>
  80. <select id="get" resultMap="tacPawpBstocmTsopbfpSctnResultMap" parameterType="String">
  81. select
  82. <include refid="table_columns"/>
  83. from TAC_PAWP_BSTOCM_TSOPBFP_SCTN where ID = #{id}
  84. </select>
  85. <select id="getBy" resultMap="tacPawpBstocmTsopbfpSctnResultMap">
  86. select
  87. <include refid="table_columns"/>
  88. from TAC_PAWP_BSTOCM_TSOPBFP_SCTN
  89. <include refid="page_where"/>
  90. </select>
  91. <select id="findAll" resultMap="tacPawpBstocmTsopbfpSctnResultMap">
  92. select
  93. <include refid="table_columns"/>
  94. from TAC_PAWP_BSTOCM_TSOPBFP_SCTN
  95. </select>
  96. <select id="findList" resultMap="tacPawpBstocmTsopbfpSctnResultMap">
  97. select
  98. <include refid="table_columns"/>
  99. from TAC_PAWP_BSTOCM_TSOPBFP_SCTN
  100. <include refid="page_where"/>
  101. </select>
  102. <select id="selectCount" resultType="int">
  103. select count(ID) from TAC_PAWP_BSTOCM_TSOPBFP_SCTN
  104. <include refid="page_where"/>
  105. </select>
  106. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmTsopbfpSctn">
  107. insert into TAC_PAWP_BSTOCM_TSOPBFP_SCTN(
  108. <include refid="table_columns"/>
  109. )
  110. values (
  111. <include refid="entity_properties"/>
  112. )
  113. </insert>
  114. <delete id="delete" parameterType="java.lang.String">
  115. delete from TAC_PAWP_BSTOCM_TSOPBFP_SCTN where ID = #{id}
  116. </delete>
  117. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmTsopbfpSctn">
  118. delete from TAC_PAWP_BSTOCM_TSOPBFP_SCTN
  119. <include refid="page_where"/>
  120. </delete>
  121. <update id="deleteInFlag" parameterType="java.lang.String">
  122. update TAC_PAWP_BSTOCM_TSOPBFP_SCTN set flag_valid = 0 where ID = #{id}
  123. </update>
  124. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmTsopbfpSctn">
  125. update TAC_PAWP_BSTOCM_TSOPBFP_SCTN
  126. <trim prefix="set" suffixOverrides=",">
  127. <if test="tsopbfpId != null and tsopbfpId != ''">TSOPBFP_ID = #{tsopbfpId},</if>
  128. <if test="sctnName != null and sctnName != ''">SCTN_NAME = #{sctnName},</if>
  129. <if test="biddingType != null">BIDDING_TYPE = #{biddingType},</if>
  130. <if test="agncy != null">AGNCY = #{agncy},</if>
  131. <if test="bidUnit != null">BID_UNIT = #{bidUnit},</if>
  132. <if test="cdtlLevl != null">CDTL_LEVL = #{cdtlLevl},</if>
  133. <if test="sctnType != null">SCTN_TYPE = #{sctnType},</if>
  134. <if test="bidCost != null">BID_COST = #{bidCost},</if>
  135. <if test="isWps != null and isWps != ''">IS_WPS = #{isWps},</if>
  136. <if test="isRbb != null and isRbb != ''">IS_RBB = #{isRbb},</if>
  137. <if test="isStabsr != null and isStabsr != ''">IS_STABSR = #{isStabsr},</if>
  138. <if test="note != null">NOTE = #{note},</if>
  139. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  140. <if test="intm != null">INTM = #{intm},</if>
  141. <if test="uptm != null">UPTM = #{uptm},</if>
  142. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  143. </trim>
  144. <where>ID = #{id}</where>
  145. </update>
  146. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpBstocmTsopbfpSctn">
  147. update TAC_PAWP_BSTOCM_TSOPBFP_SCTN
  148. <trim prefix="set" suffixOverrides=",">
  149. <if test="tsopbfpId != null and tsopbfpId != ''">TSOPBFP_ID = #{tsopbfpId},</if>
  150. <if test="sctnName != null and sctnName != ''">SCTN_NAME = #{sctnName},</if>
  151. <if test="biddingType != null">BIDDING_TYPE = #{biddingType},</if>
  152. <if test="agncy != null">AGNCY = #{agncy},</if>
  153. <if test="bidUnit != null">BID_UNIT = #{bidUnit},</if>
  154. <if test="cdtlLevl != null">CDTL_LEVL = #{cdtlLevl},</if>
  155. <if test="bidCost != null">BID_COST = #{bidCost},</if>
  156. <if test="isWps != null and isWps != ''">IS_WPS = #{isWps},</if>
  157. <if test="isRbb != null and isRbb != ''">IS_RBB = #{isRbb},</if>
  158. <if test="isStabsr != null and isStabsr != ''">IS_STABSR = #{isStabsr},</if>
  159. <if test="note != null">NOTE = #{note},</if>
  160. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  161. <if test="intm != null">INTM = #{intm},</if>
  162. <if test="uptm != null">UPTM = #{uptm},</if>
  163. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  164. </trim>
  165. <include refid="page_where"/>
  166. </update>
  167. <!-- 其他自定义SQL -->
  168. </mapper>