BisInspWagaMrsCiDao.xml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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.BisInspWagaMrsCiDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWagaMrsCi" id="bisInspWagaMrsCiResultMap">
  5. <result property="uptm" column="UPTM"/>
  6. <result property="dataStat" column="DATA_STAT"/>
  7. <result property="id" column="ID"/>
  8. <result property="rgstrId" column="RGSTR_ID"/>
  9. <result property="wmbpIsC" column="WMBP_IS_C"/>
  10. <result property="pssIsH" column="PSS_IS_H"/>
  11. <result property="pssIsC" column="PSS_IS_C"/>
  12. <result property="prftaofcIsH" column="PRFTAOFC_IS_H"/>
  13. <result property="prftaofcInfo" column="PRFTAOFC_INFO"/>
  14. <result property="befpIsFip" column="BEFP_IS_FIP"/>
  15. <result property="pmameIsFip" column="PMAME_IS_FIP"/>
  16. <result property="recPersId" column="REC_PERS_ID"/>
  17. <result property="intm" column="INTM"/>
  18. <result property="reverOrg" column="REVER_ORG"/>
  19. <result property="reverOrgName" column="REVER_ORG_NAME"/>
  20. </resultMap>
  21. <sql id="table_columns">
  22. UPTM,
  23. DATA_STAT,
  24. ID,
  25. RGSTR_ID,
  26. WMBP_IS_C,
  27. PSS_IS_H,
  28. PSS_IS_C,
  29. PRFTAOFC_IS_H,
  30. PRFTAOFC_INFO,
  31. BEFP_IS_FIP,
  32. PMAME_IS_FIP,
  33. REC_PERS_ID,
  34. INTM,REVER_ORG,REVER_ORG_NAME
  35. </sql>
  36. <sql id="entity_properties">
  37. #{uptm},
  38. #{dataStat},
  39. #{id},
  40. #{rgstrId},
  41. #{wmbpIsC},
  42. #{pssIsH},
  43. #{pssIsC},
  44. #{prftaofcIsH},
  45. #{prftaofcInfo},
  46. #{befpIsFip},
  47. #{pmameIsFip},
  48. #{recPersId},
  49. #{intm},#{reverOrg},#{reverOrgName}
  50. </sql>
  51. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  52. <sql id="page_where">
  53. <trim prefix="where" prefixOverrides="and | or ">
  54. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  55. <if test="id != null and id != ''">and ID = #{id}</if>
  56. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  57. <if test="wmbpIsC != null and wmbpIsC != ''">and WMBP_IS_C = #{wmbpIsC}</if>
  58. <if test="pssIsH != null and pssIsH != ''">and PSS_IS_H = #{pssIsH}</if>
  59. <if test="pssIsC != null and pssIsC != ''">and PSS_IS_C = #{pssIsC}</if>
  60. <if test="prftaofcIsH != null and prftaofcIsH != ''">and PRFTAOFC_IS_H = #{prftaofcIsH}</if>
  61. <if test="prftaofcInfo != null and prftaofcInfo != ''">and PRFTAOFC_INFO = #{prftaofcInfo}</if>
  62. <if test="befpIsFip != null and befpIsFip != ''">and BEFP_IS_FIP = #{befpIsFip}</if>
  63. <if test="pmameIsFip != null and pmameIsFip != ''">and PMAME_IS_FIP = #{pmameIsFip}</if>
  64. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  65. <if test="reverOrg != null and reverOrg != ''">and rever_Org = #{reverOrg}</if>
  66. <if test="reverOrgName != null and reverOrgName != ''">and rever_Org_Name = #{reverOrgName}</if>
  67. <if test="intm != null">and INTM = #{intm}</if>
  68. </trim>
  69. </sql>
  70. <select id="get" resultMap="bisInspWagaMrsCiResultMap" parameterType="String">
  71. select
  72. <include refid="table_columns"/>
  73. from BIS_INSP_WAGA_MRS_CI where ID = #{id}
  74. </select>
  75. <select id="getBy" resultMap="bisInspWagaMrsCiResultMap">
  76. select
  77. <include refid="table_columns"/>
  78. from BIS_INSP_WAGA_MRS_CI
  79. <include refid="page_where"/>
  80. </select>
  81. <select id="findAll" resultMap="bisInspWagaMrsCiResultMap">
  82. select
  83. <include refid="table_columns"/>
  84. from BIS_INSP_WAGA_MRS_CI
  85. </select>
  86. <select id="findList" resultMap="bisInspWagaMrsCiResultMap">
  87. select
  88. <include refid="table_columns"/>
  89. from BIS_INSP_WAGA_MRS_CI
  90. <include refid="page_where"/>
  91. </select>
  92. <select id="selectCount" resultType="int">
  93. select count(ID) from BIS_INSP_WAGA_MRS_CI
  94. <include refid="page_where"/>
  95. </select>
  96. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaMrsCi">
  97. insert into BIS_INSP_WAGA_MRS_CI(
  98. <include refid="table_columns"/>
  99. )
  100. values (
  101. <include refid="entity_properties"/>
  102. )
  103. </insert>
  104. <delete id="delete" parameterType="java.lang.String">
  105. delete from BIS_INSP_WAGA_MRS_CI where ID = #{id}
  106. </delete>
  107. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaMrsCi">
  108. delete from BIS_INSP_WAGA_MRS_CI
  109. <include refid="page_where"/>
  110. </delete>
  111. <update id="deleteInFlag" parameterType="java.lang.String">
  112. update BIS_INSP_WAGA_MRS_CI set flag_valid = 0 where ID = #{id}
  113. </update>
  114. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaMrsCi">
  115. update BIS_INSP_WAGA_MRS_CI
  116. <trim prefix="set" suffixOverrides=",">
  117. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  118. <if test="id != null and id != ''">ID = #{id},</if>
  119. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  120. <if test="wmbpIsC != null and wmbpIsC != ''">WMBP_IS_C = #{wmbpIsC},</if>
  121. <if test="pssIsH != null and pssIsH != ''">PSS_IS_H = #{pssIsH},</if>
  122. <if test="pssIsC != null and pssIsC != ''">PSS_IS_C = #{pssIsC},</if>
  123. <if test="prftaofcIsH != null and prftaofcIsH != ''">PRFTAOFC_IS_H = #{prftaofcIsH},</if>
  124. <if test="prftaofcInfo != null and prftaofcInfo != ''">PRFTAOFC_INFO = #{prftaofcInfo},</if>
  125. <if test="befpIsFip != null and befpIsFip != ''">BEFP_IS_FIP = #{befpIsFip},</if>
  126. <if test="pmameIsFip != null and pmameIsFip != ''">PMAME_IS_FIP = #{pmameIsFip},</if>
  127. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  128. <if test="intm != null">INTM = #{intm},</if>
  129. <if test="reverOrg != null and reverOrg != ''">rever_Org = #{reverOrg},</if>
  130. <if test="reverOrgName != null and reverOrgName != ''">rever_Org_Name = #{reverOrgName},</if>
  131. </trim>
  132. <where>ID = #{id}</where>
  133. </update>
  134. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWagaMrsCi">
  135. update BIS_INSP_WAGA_MRS_CI
  136. <trim prefix="set" suffixOverrides=",">
  137. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  138. <if test="id != null and id != ''">ID = #{id},</if>
  139. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  140. <if test="wmbpIsC != null and wmbpIsC != ''">WMBP_IS_C = #{wmbpIsC},</if>
  141. <if test="pssIsH != null and pssIsH != ''">PSS_IS_H = #{pssIsH},</if>
  142. <if test="pssIsC != null and pssIsC != ''">PSS_IS_C = #{pssIsC},</if>
  143. <if test="prftaofcIsH != null and prftaofcIsH != ''">PRFTAOFC_IS_H = #{prftaofcIsH},</if>
  144. <if test="prftaofcInfo != null and prftaofcInfo != ''">PRFTAOFC_INFO = #{prftaofcInfo},</if>
  145. <if test="befpIsFip != null and befpIsFip != ''">BEFP_IS_FIP = #{befpIsFip},</if>
  146. <if test="pmameIsFip != null and pmameIsFip != ''">PMAME_IS_FIP = #{pmameIsFip},</if>
  147. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  148. <if test="intm != null">INTM = #{intm},</if>
  149. <if test="reverOrg != null and reverOrg != ''">rever_Org = #{reverOrg},</if>
  150. <if test="reverOrgName != null and reverOrgName != ''">rever_Org_Name = #{reverOrgName},</if>
  151. </trim>
  152. <include refid="page_where"/>
  153. </update>
  154. <!-- 其他自定义SQL -->
  155. </mapper>