BisInspRsfcoRgstrBaseDao.xml 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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.BisInspRsfcoRgstrBaseDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrBase" id="bisInspRsfcoRgstrBaseResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="admOrg" column="ADM_ORG"/>
  8. <result property="poorCountry" column="POOR_COUNTRY"/>
  9. <result property="mngtUnit" column="MNGT_UNIT"/>
  10. <result property="cpttUnit" column="CPTT_UNIT"/>
  11. <result property="orgUnit" column="ORG_UNIT"/>
  12. <result property="fldWk" column="FLD_WK"/>
  13. <result property="fldWkTm" column="FLD_WK_TM"/>
  14. <result property="calls" column="CALLS"/>
  15. <result property="callsTm" column="CALLS_TM"/>
  16. <result property="imgVfct" column="IMG_VFCT"/>
  17. <result property="imgVfctTm" column="IMG_VFCT_TM"/>
  18. <result property="vdoCnnt" column="VDO_CNNT"/>
  19. <result property="vdoCnntTm" column="VDO_CNNT_TM"/>
  20. <result property="gtFlLowLimLev" column="GT_FL_LOW_LIM_LEV"/>
  21. <result property="isVlts" column="IS_VLTS"/>
  22. <result property="status" column="STATUS"/>
  23. <result property="recPersId" column="REC_PERS_ID"/>
  24. <result property="recPers" column="REC_PERS"/>
  25. <result property="recPersTel" column="REC_PERS_TEL"/>
  26. <result property="intm" column="INTM"/>
  27. <result property="uptm" column="UPTM"/>
  28. </resultMap>
  29. <sql id="table_columns">
  30. ID,
  31. RGSTR_ID,
  32. ADM_ORG,
  33. POOR_COUNTRY,
  34. MNGT_UNIT,
  35. CPTT_UNIT,
  36. ORG_UNIT,
  37. FLD_WK,
  38. FLD_WK_TM,
  39. CALLS,
  40. CALLS_TM,
  41. IMG_VFCT,
  42. IMG_VFCT_TM,
  43. VDO_CNNT,
  44. VDO_CNNT_TM,
  45. GT_FL_LOW_LIM_LEV,
  46. IS_VLTS,
  47. STATUS,
  48. REC_PERS_ID,
  49. REC_PERS,
  50. REC_PERS_TEL,
  51. INTM,
  52. UPTM
  53. </sql>
  54. <sql id="entity_properties">
  55. #{id},
  56. #{rgstrId},
  57. #{admOrg},
  58. #{poorCountry},
  59. #{mngtUnit},
  60. #{cpttUnit},
  61. #{orgUnit},
  62. #{fldWk},
  63. #{fldWkTm},
  64. #{calls},
  65. #{callsTm},
  66. #{imgVfct},
  67. #{imgVfctTm},
  68. #{vdoCnnt},
  69. #{vdoCnntTm},
  70. #{gtFlLowLimLev},
  71. #{isVlts},
  72. #{status},
  73. #{recPersId},
  74. #{recPers},
  75. #{recPersTel},
  76. #{intm},
  77. #{uptm}
  78. </sql>
  79. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  80. <sql id="page_where">
  81. <trim prefix="where" prefixOverrides="and | or ">
  82. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  83. <if test="admOrg != null and admOrg != ''">and ADM_ORG = #{admOrg}</if>
  84. <if test="poorCountry != null and poorCountry != ''">and POOR_COUNTRY = #{poorCountry}</if>
  85. <if test="mngtUnit != null and mngtUnit != ''">and MNGT_UNIT = #{mngtUnit}</if>
  86. <if test="cpttUnit != null and cpttUnit != ''">and CPTT_UNIT = #{cpttUnit}</if>
  87. <if test="orgUnit != null and orgUnit != ''">and ORG_UNIT = #{orgUnit}</if>
  88. <if test="fldWk != null and fldWk != ''">and FLD_WK = #{fldWk}</if>
  89. <if test="fldWkTm != null">and FLD_WK_TM = #{fldWkTm}</if>
  90. <if test="calls != null and calls != ''">and CALLS = #{calls}</if>
  91. <if test="callsTm != null">and CALLS_TM = #{callsTm}</if>
  92. <if test="imgVfct != null and imgVfct != ''">and IMG_VFCT = #{imgVfct}</if>
  93. <if test="imgVfctTm != null">and IMG_VFCT_TM = #{imgVfctTm}</if>
  94. <if test="vdoCnnt != null and vdoCnnt != ''">and VDO_CNNT = #{vdoCnnt}</if>
  95. <if test="vdoCnntTm != null">and VDO_CNNT_TM = #{vdoCnntTm}</if>
  96. <if test="gtFlLowLimLev != null and gtFlLowLimLev != ''">and GT_FL_LOW_LIM_LEV = #{gtFlLowLimLev}</if>
  97. <if test="isVlts != null and isVlts != ''">and IS_VLTS = #{isVlts}</if>
  98. <if test="status != null and status != ''">and STATUS = #{status}</if>
  99. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  100. <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
  101. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  102. <if test="intm != null">and INTM = #{intm}</if>
  103. <if test="uptm != null">and UPTM = #{uptm}</if>
  104. </trim>
  105. </sql>
  106. <select id="get" resultMap="bisInspRsfcoRgstrBaseResultMap" parameterType="String" >
  107. select <include refid="table_columns" /> from BIS_INSP_RSFCO_RGSTR_BASE where ID = #{id}
  108. </select>
  109. <select id="getBy" resultMap="bisInspRsfcoRgstrBaseResultMap">
  110. select <include refid="table_columns" /> from BIS_INSP_RSFCO_RGSTR_BASE <include refid="page_where" />
  111. </select>
  112. <select id="findAll" resultMap="bisInspRsfcoRgstrBaseResultMap">
  113. select <include refid="table_columns" /> from BIS_INSP_RSFCO_RGSTR_BASE
  114. </select>
  115. <select id="findList" resultMap="bisInspRsfcoRgstrBaseResultMap">
  116. select <include refid="table_columns" /> from BIS_INSP_RSFCO_RGSTR_BASE <include refid="page_where" />
  117. </select>
  118. <select id="selectCount" resultType="int" >
  119. select count(ID) from BIS_INSP_RSFCO_RGSTR_BASE <include refid="page_where" />
  120. </select>
  121. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrBase">
  122. insert into BIS_INSP_RSFCO_RGSTR_BASE( <include refid="table_columns" /> )
  123. values ( <include refid="entity_properties" /> )
  124. </insert>
  125. <delete id="delete" parameterType="java.lang.String">
  126. delete from BIS_INSP_RSFCO_RGSTR_BASE where ID = #{id}
  127. </delete>
  128. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrBase">
  129. delete from BIS_INSP_RSFCO_RGSTR_BASE <include refid="page_where" />
  130. </delete>
  131. <update id="deleteInFlag" parameterType="java.lang.String">
  132. update BIS_INSP_RSFCO_RGSTR_BASE set flag_valid = 0 where ID = #{id}
  133. </update>
  134. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrBase">
  135. update BIS_INSP_RSFCO_RGSTR_BASE
  136. <trim prefix="set" suffixOverrides=",">
  137. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  138. <if test="admOrg != null and admOrg != ''">ADM_ORG = #{admOrg},</if>
  139. <if test="poorCountry != null and poorCountry != ''">POOR_COUNTRY = #{poorCountry},</if>
  140. <if test="mngtUnit != null and mngtUnit != ''">MNGT_UNIT = #{mngtUnit},</if>
  141. <if test="cpttUnit != null and cpttUnit != ''">CPTT_UNIT = #{cpttUnit},</if>
  142. <if test="orgUnit != null and orgUnit != ''">ORG_UNIT = #{orgUnit},</if>
  143. <if test="fldWk != null and fldWk != ''">FLD_WK = #{fldWk},</if>
  144. <if test="fldWkTm != null">FLD_WK_TM = #{fldWkTm},</if>
  145. <if test="calls != null and calls != ''">CALLS = #{calls},</if>
  146. <if test="callsTm != null">CALLS_TM = #{callsTm},</if>
  147. <if test="imgVfct != null and imgVfct != ''">IMG_VFCT = #{imgVfct},</if>
  148. <if test="imgVfctTm != null">IMG_VFCT_TM = #{imgVfctTm},</if>
  149. <if test="vdoCnnt != null and vdoCnnt != ''">VDO_CNNT = #{vdoCnnt},</if>
  150. <if test="vdoCnntTm != null">VDO_CNNT_TM = #{vdoCnntTm},</if>
  151. <if test="gtFlLowLimLev != null and gtFlLowLimLev != ''">GT_FL_LOW_LIM_LEV = #{gtFlLowLimLev},</if>
  152. <if test="isVlts != null and isVlts != ''">IS_VLTS = #{isVlts},</if>
  153. <if test="status != null and status != ''">STATUS = #{status},</if>
  154. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  155. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  156. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  157. <if test="intm != null">INTM = #{intm},</if>
  158. <if test="uptm != null">UPTM = #{uptm},</if>
  159. </trim>
  160. <where>ID = #{id}</where>
  161. </update>
  162. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsfcoRgstrBase">
  163. update BIS_INSP_RSFCO_RGSTR_BASE
  164. <trim prefix="set" suffixOverrides=",">
  165. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  166. <if test="admOrg != null and admOrg != ''">ADM_ORG = #{admOrg},</if>
  167. <if test="poorCountry != null and poorCountry != ''">POOR_COUNTRY = #{poorCountry},</if>
  168. <if test="mngtUnit != null and mngtUnit != ''">MNGT_UNIT = #{mngtUnit},</if>
  169. <if test="cpttUnit != null and cpttUnit != ''">CPTT_UNIT = #{cpttUnit},</if>
  170. <if test="orgUnit != null and orgUnit != ''">ORG_UNIT = #{orgUnit},</if>
  171. <if test="fldWk != null and fldWk != ''">FLD_WK = #{fldWk},</if>
  172. <if test="fldWkTm != null">FLD_WK_TM = #{fldWkTm},</if>
  173. <if test="calls != null and calls != ''">CALLS = #{calls},</if>
  174. <if test="callsTm != null">CALLS_TM = #{callsTm},</if>
  175. <if test="imgVfct != null and imgVfct != ''">IMG_VFCT = #{imgVfct},</if>
  176. <if test="imgVfctTm != null">IMG_VFCT_TM = #{imgVfctTm},</if>
  177. <if test="vdoCnnt != null and vdoCnnt != ''">VDO_CNNT = #{vdoCnnt},</if>
  178. <if test="vdoCnntTm != null">VDO_CNNT_TM = #{vdoCnntTm},</if>
  179. <if test="gtFlLowLimLev != null and gtFlLowLimLev != ''">GT_FL_LOW_LIM_LEV = #{gtFlLowLimLev},</if>
  180. <if test="isVlts != null and isVlts != ''">IS_VLTS = #{isVlts},</if>
  181. <if test="status != null and status != ''">STATUS = #{status},</if>
  182. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  183. <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
  184. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  185. <if test="intm != null">INTM = #{intm},</if>
  186. <if test="uptm != null">UPTM = #{uptm},</if>
  187. </trim>
  188. <include refid="page_where" />
  189. </update>
  190. <!-- 其他自定义SQL -->
  191. </mapper>