BisInspWagaBaseDao.xml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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.BisInspWagaBaseDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWagaBase" id="bisInspWagaBaseResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="gateAdmOrg" column="GATE_ADM_ORG"/>
  8. <result property="oeseInfo" column="OESE_INFO"/>
  9. <result property="ifEffective" column="IF_EFFECTIVE"/>
  10. <result property="effvCas" column="EFFV_CAS"/>
  11. <result property="effectiveOth" column="EFFECTIVE_OTH"/>
  12. <result property="extDamSafeAppr" column="EXT_DAM_SAFE_APPR"/>
  13. <result property="extDamSafeApprInfo" column="EXT_DAM_SAFE_APPR_INFO"/>
  14. <result property="prftaofcIsH" column="PRFTAOFC_IS_H"/>
  15. <result property="recPersId" column="REC_PERS_ID"/>
  16. <result property="intm" column="INTM"/>
  17. <result property="uptm" column="UPTM"/>
  18. <result property="dataStat" column="DATA_STAT"/>
  19. <result property="adCode" column="AD_CODE"/>
  20. <result property="adName" column="AD_NAME"/>
  21. <result property="adFullName" column="AD_FULL_NAME"/>
  22. <result property="gateAdmName" column="GATE_ADM_NAME"/>
  23. <result property="gateFlow" column="GATE_FLOW"/>
  24. <result property="engScal" column="ENG_SCAL"/>
  25. <result property="buildStat" column="BUILD_STAT"/>
  26. </resultMap>
  27. <sql id="table_columns">
  28. AD_CODE,
  29. AD_NAME,
  30. AD_FULL_NAME,
  31. GATE_ADM_NAME,
  32. GATE_FLOW,
  33. ENG_SCAL,
  34. ID,
  35. RGSTR_ID,
  36. GATE_ADM_ORG,
  37. OESE_INFO,
  38. IF_EFFECTIVE,
  39. EFFV_CAS,
  40. EFFECTIVE_OTH,
  41. EXT_DAM_SAFE_APPR,
  42. EXT_DAM_SAFE_APPR_INFO,
  43. PRFTAOFC_IS_H,
  44. REC_PERS_ID,
  45. INTM,
  46. UPTM,
  47. DATA_STAT,
  48. BUILD_STAT
  49. </sql>
  50. <sql id="entity_properties">
  51. #{adCode},
  52. #{adName},
  53. #{adFullName},
  54. #{gateAdmName},
  55. #{gateFlow},
  56. #{engScal},
  57. #{id},
  58. #{rgstrId},
  59. #{gateAdmOrg},
  60. #{oeseInfo},
  61. #{ifEffective},
  62. #{effvCas},
  63. #{effectiveOth},
  64. #{extDamSafeAppr},
  65. #{extDamSafeApprInfo},
  66. #{prftaofcIsH},
  67. #{recPersId},
  68. #{intm},
  69. #{uptm},
  70. #{dataStat},
  71. #{buildStat}
  72. </sql>
  73. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  74. <sql id="page_where">
  75. <trim prefix="where" prefixOverrides="and | or ">
  76. <if test="buildStat != null and buildStat != ''">and BUILD_STAT = #{buildStat}</if>
  77. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  78. <if test="adFullName != null and adFullName != ''">and AD_FULL_NAME = #{adFullName}</if>
  79. <if test="gateAdmName != null and gateAdmName != ''">and GATE_ADM_NAME = #{gateAdmName}</if>
  80. <if test="gateFlow != null and gateFlow != ''">and GATE_FLOW = #{gateFlow}</if>
  81. <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
  82. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  83. <if test="gateAdmOrg != null and gateAdmOrg != ''">and GATE_ADM_ORG = #{gateAdmOrg}</if>
  84. <if test="oeseInfo != null and oeseInfo != ''">and OESE_INFO = #{oeseInfo}</if>
  85. <if test="ifEffective != null and ifEffective != ''">and IF_EFFECTIVE = #{ifEffective}</if>
  86. <if test="effvCas != null and effvCas != ''">and EFFV_CAS = #{effvCas}</if>
  87. <if test="effectiveOth != null and effectiveOth != ''">and EFFECTIVE_OTH = #{effectiveOth}</if>
  88. <if test="extDamSafeAppr != null and extDamSafeAppr != ''">and EXT_DAM_SAFE_APPR = #{extDamSafeAppr}</if>
  89. <if test="extDamSafeApprInfo != null and extDamSafeApprInfo != ''">and EXT_DAM_SAFE_APPR_INFO = #{extDamSafeApprInfo}</if>
  90. <if test="prftaofcIsH != null and prftaofcIsH != ''">and PRFTAOFC_IS_H = #{prftaofcIsH}</if>
  91. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  92. <if test="intm != null">and INTM = #{intm}</if>
  93. <if test="uptm != null">and UPTM = #{uptm}</if>
  94. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  95. </trim>
  96. </sql>
  97. <select id="get" resultMap="bisInspWagaBaseResultMap" parameterType="String" >
  98. select <include refid="table_columns" /> from BIS_INSP_WAGA_BASE where ID = #{id}
  99. </select>
  100. <select id="getBy" resultMap="bisInspWagaBaseResultMap">
  101. select <include refid="table_columns" /> from BIS_INSP_WAGA_BASE <include refid="page_where" />
  102. </select>
  103. <select id="findAll" resultMap="bisInspWagaBaseResultMap">
  104. select <include refid="table_columns" /> from BIS_INSP_WAGA_BASE
  105. </select>
  106. <select id="findList" resultMap="bisInspWagaBaseResultMap">
  107. select <include refid="table_columns" /> from BIS_INSP_WAGA_BASE <include refid="page_where" />
  108. </select>
  109. <select id="selectCount" resultType="int" >
  110. select count(ID) from BIS_INSP_WAGA_BASE <include refid="page_where" />
  111. </select>
  112. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaBase">
  113. insert into BIS_INSP_WAGA_BASE( <include refid="table_columns" /> )
  114. values ( <include refid="entity_properties" /> )
  115. </insert>
  116. <delete id="delete" parameterType="java.lang.String">
  117. delete from BIS_INSP_WAGA_BASE where ID = #{id}
  118. </delete>
  119. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaBase">
  120. delete from BIS_INSP_WAGA_BASE <include refid="page_where" />
  121. </delete>
  122. <update id="deleteInFlag" parameterType="java.lang.String">
  123. update BIS_INSP_WAGA_BASE set flag_valid = 0 where ID = #{id}
  124. </update>
  125. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaBase">
  126. update BIS_INSP_WAGA_BASE
  127. <trim prefix="set" suffixOverrides=",">
  128. <if test="buildStat != null and buildStat != ''">BUILD_STAT = #{buildStat},</if>
  129. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  130. <if test="adFullName != null and adFullName != ''">AD_FULL_NAME = #{adFullName},</if>
  131. <if test="gateAdmName != null and gateAdmName != ''">GATE_ADM_NAME = #{gateAdmName},</if>
  132. <if test="gateFlow != null and gateFlow != ''">GATE_FLOW = #{gateFlow},</if>
  133. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  134. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  135. <if test="gateAdmOrg != null and gateAdmOrg != ''">GATE_ADM_ORG = #{gateAdmOrg},</if>
  136. <if test="oeseInfo != null and oeseInfo != ''">OESE_INFO = #{oeseInfo},</if>
  137. <if test="ifEffective != null and ifEffective != ''">IF_EFFECTIVE = #{ifEffective},</if>
  138. <if test="effvCas != null and effvCas != ''">EFFV_CAS = #{effvCas},</if>
  139. <if test="effectiveOth != null and effectiveOth != ''">EFFECTIVE_OTH = #{effectiveOth},</if>
  140. <if test="extDamSafeAppr != null and extDamSafeAppr != ''">EXT_DAM_SAFE_APPR = #{extDamSafeAppr},</if>
  141. <if test="extDamSafeApprInfo != null and extDamSafeApprInfo != ''">EXT_DAM_SAFE_APPR_INFO = #{extDamSafeApprInfo},</if>
  142. <if test="prftaofcIsH != null and prftaofcIsH != ''">PRFTAOFC_IS_H = #{prftaofcIsH},</if>
  143. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  144. <if test="intm != null">INTM = #{intm},</if>
  145. <if test="uptm != null">UPTM = #{uptm},</if>
  146. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  147. </trim>
  148. <where>ID = #{id}</where>
  149. </update>
  150. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaBase">
  151. update BIS_INSP_WAGA_BASE
  152. <trim prefix="set" suffixOverrides=",">
  153. <if test="buildStat != null and buildStat != ''">BUILD_STAT = #{buildStat},</if>
  154. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  155. <if test="adFullName != null and adFullName != ''">AD_FULL_NAME = #{adFullName},</if>
  156. <if test="gateAdmName != null and gateAdmName != ''">GATE_ADM_NAME = #{gateAdmName},</if>
  157. <if test="gateFlow != null and gateFlow != ''">GATE_FLOW = #{gateFlow},</if>
  158. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  159. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  160. <if test="gateAdmOrg != null and gateAdmOrg != ''">GATE_ADM_ORG = #{gateAdmOrg},</if>
  161. <if test="oeseInfo != null and oeseInfo != ''">OESE_INFO = #{oeseInfo},</if>
  162. <if test="ifEffective != null and ifEffective != ''">IF_EFFECTIVE = #{ifEffective},</if>
  163. <if test="effvCas != null and effvCas != ''">EFFV_CAS = #{effvCas},</if>
  164. <if test="effectiveOth != null and effectiveOth != ''">EFFECTIVE_OTH = #{effectiveOth},</if>
  165. <if test="extDamSafeAppr != null and extDamSafeAppr != ''">EXT_DAM_SAFE_APPR = #{extDamSafeAppr},</if>
  166. <if test="extDamSafeApprInfo != null and extDamSafeApprInfo != ''">EXT_DAM_SAFE_APPR_INFO = #{extDamSafeApprInfo},</if>
  167. <if test="prftaofcIsH != null and prftaofcIsH != ''">PRFTAOFC_IS_H = #{prftaofcIsH},</if>
  168. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  169. <if test="intm != null">INTM = #{intm},</if>
  170. <if test="uptm != null">UPTM = #{uptm},</if>
  171. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  172. </trim>
  173. <include refid="page_where" />
  174. </update>
  175. <!-- 其他自定义SQL -->
  176. <update id="updateOeseInfo" parameterType="String">
  177. update BIS_INSP_WAGA_BASE set OESE_INFO = #{oeseStat} where RGSTR_ID = #{rgstrId}
  178. </update>
  179. </mapper>