BisInspWagaBaseDao.xml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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. </resultMap>
  20. <sql id="table_columns">
  21. ID,
  22. RGSTR_ID,
  23. GATE_ADM_ORG,
  24. OESE_INFO,
  25. IF_EFFECTIVE,
  26. EFFV_CAS,
  27. EFFECTIVE_OTH,
  28. EXT_DAM_SAFE_APPR,
  29. EXT_DAM_SAFE_APPR_INFO,
  30. PRFTAOFC_IS_H,
  31. REC_PERS_ID,
  32. INTM,
  33. UPTM,
  34. DATA_STAT
  35. </sql>
  36. <sql id="entity_properties">
  37. #{id},
  38. #{rgstrId},
  39. #{gateAdmOrg},
  40. #{oeseInfo},
  41. #{ifEffective},
  42. #{effvCas},
  43. #{effectiveOth},
  44. #{extDamSafeAppr},
  45. #{extDamSafeApprInfo},
  46. #{prftaofcIsH},
  47. #{recPersId},
  48. #{intm},
  49. #{uptm},
  50. #{dataStat}
  51. </sql>
  52. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  53. <sql id="page_where">
  54. <trim prefix="where" prefixOverrides="and | or ">
  55. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  56. <if test="gateAdmOrg != null and gateAdmOrg != ''">and GATE_ADM_ORG = #{gateAdmOrg}</if>
  57. <if test="oeseInfo != null and oeseInfo != ''">and OESE_INFO = #{oeseInfo}</if>
  58. <if test="ifEffective != null and ifEffective != ''">and IF_EFFECTIVE = #{ifEffective}</if>
  59. <if test="effvCas != null and effvCas != ''">and EFFV_CAS = #{effvCas}</if>
  60. <if test="effectiveOth != null and effectiveOth != ''">and EFFECTIVE_OTH = #{effectiveOth}</if>
  61. <if test="extDamSafeAppr != null and extDamSafeAppr != ''">and EXT_DAM_SAFE_APPR = #{extDamSafeAppr}</if>
  62. <if test="extDamSafeApprInfo != null and extDamSafeApprInfo != ''">and EXT_DAM_SAFE_APPR_INFO = #{extDamSafeApprInfo}</if>
  63. <if test="prftaofcIsH != null and prftaofcIsH != ''">and PRFTAOFC_IS_H = #{prftaofcIsH}</if>
  64. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  65. <if test="intm != null">and INTM = #{intm}</if>
  66. <if test="uptm != null">and UPTM = #{uptm}</if>
  67. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  68. </trim>
  69. </sql>
  70. <select id="get" resultMap="bisInspWagaBaseResultMap" parameterType="String" >
  71. select <include refid="table_columns" /> from BIS_INSP_WAGA_BASE where ID = #{id}
  72. </select>
  73. <select id="getBy" resultMap="bisInspWagaBaseResultMap">
  74. select <include refid="table_columns" /> from BIS_INSP_WAGA_BASE <include refid="page_where" />
  75. </select>
  76. <select id="findAll" resultMap="bisInspWagaBaseResultMap">
  77. select <include refid="table_columns" /> from BIS_INSP_WAGA_BASE
  78. </select>
  79. <select id="findList" resultMap="bisInspWagaBaseResultMap">
  80. select <include refid="table_columns" /> from BIS_INSP_WAGA_BASE <include refid="page_where" />
  81. </select>
  82. <select id="selectCount" resultType="int" >
  83. select count(ID) from BIS_INSP_WAGA_BASE <include refid="page_where" />
  84. </select>
  85. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaBase">
  86. insert into BIS_INSP_WAGA_BASE( <include refid="table_columns" /> )
  87. values ( <include refid="entity_properties" /> )
  88. </insert>
  89. <delete id="delete" parameterType="java.lang.String">
  90. delete from BIS_INSP_WAGA_BASE where ID = #{id}
  91. </delete>
  92. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaBase">
  93. delete from BIS_INSP_WAGA_BASE <include refid="page_where" />
  94. </delete>
  95. <update id="deleteInFlag" parameterType="java.lang.String">
  96. update BIS_INSP_WAGA_BASE set flag_valid = 0 where ID = #{id}
  97. </update>
  98. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaBase">
  99. update BIS_INSP_WAGA_BASE
  100. <trim prefix="set" suffixOverrides=",">
  101. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  102. <if test="gateAdmOrg != null and gateAdmOrg != ''">GATE_ADM_ORG = #{gateAdmOrg},</if>
  103. <if test="oeseInfo != null and oeseInfo != ''">OESE_INFO = #{oeseInfo},</if>
  104. <if test="ifEffective != null and ifEffective != ''">IF_EFFECTIVE = #{ifEffective},</if>
  105. <if test="effvCas != null and effvCas != ''">EFFV_CAS = #{effvCas},</if>
  106. <if test="effectiveOth != null and effectiveOth != ''">EFFECTIVE_OTH = #{effectiveOth},</if>
  107. <if test="extDamSafeAppr != null and extDamSafeAppr != ''">EXT_DAM_SAFE_APPR = #{extDamSafeAppr},</if>
  108. <if test="extDamSafeApprInfo != null and extDamSafeApprInfo != ''">EXT_DAM_SAFE_APPR_INFO = #{extDamSafeApprInfo},</if>
  109. <if test="prftaofcIsH != null and prftaofcIsH != ''">PRFTAOFC_IS_H = #{prftaofcIsH},</if>
  110. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  111. <if test="intm != null">INTM = #{intm},</if>
  112. <if test="uptm != null">UPTM = #{uptm},</if>
  113. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  114. </trim>
  115. <where>ID = #{id}</where>
  116. </update>
  117. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaBase">
  118. update BIS_INSP_WAGA_BASE
  119. <trim prefix="set" suffixOverrides=",">
  120. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  121. <if test="gateAdmOrg != null and gateAdmOrg != ''">GATE_ADM_ORG = #{gateAdmOrg},</if>
  122. <if test="oeseInfo != null and oeseInfo != ''">OESE_INFO = #{oeseInfo},</if>
  123. <if test="ifEffective != null and ifEffective != ''">IF_EFFECTIVE = #{ifEffective},</if>
  124. <if test="effvCas != null and effvCas != ''">EFFV_CAS = #{effvCas},</if>
  125. <if test="effectiveOth != null and effectiveOth != ''">EFFECTIVE_OTH = #{effectiveOth},</if>
  126. <if test="extDamSafeAppr != null and extDamSafeAppr != ''">EXT_DAM_SAFE_APPR = #{extDamSafeAppr},</if>
  127. <if test="extDamSafeApprInfo != null and extDamSafeApprInfo != ''">EXT_DAM_SAFE_APPR_INFO = #{extDamSafeApprInfo},</if>
  128. <if test="prftaofcIsH != null and prftaofcIsH != ''">PRFTAOFC_IS_H = #{prftaofcIsH},</if>
  129. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  130. <if test="intm != null">INTM = #{intm},</if>
  131. <if test="uptm != null">UPTM = #{uptm},</if>
  132. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  133. </trim>
  134. <include refid="page_where" />
  135. </update>
  136. <!-- 其他自定义SQL -->
  137. <update id="updateOeseInfo" parameterType="String">
  138. update BIS_INSP_WAGA_BASE set OESE_INFO = #{oeseStat} where RGSTR_ID = #{rgstrId}
  139. </update>
  140. </mapper>