BisInspCdepBehDao.xml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  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.BisInspCdepBehDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspCdepBeh" id="bisInspCdepBehResultMap">
  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="isAilCer" column="IS_AIL_CER"/>
  10. <result property="isAchUnd" column="IS_ACH_UND"/>
  11. <result property="isSubBus" column="IS_SUB_BUS"/>
  12. <result property="isBeyEng" column="IS_BEY_ENG"/>
  13. <result property="isProSig" column="IS_PRO_SIG"/>
  14. <result property="isProRep" column="IS_PRO_REP"/>
  15. <result property="isFalFak" column="IS_FAL_FAK"/>
  16. <result property="isStaImp" column="IS_STA_IMP"/>
  17. <result property="isSamSta" column="IS_SAM_STA"/>
  18. <result property="state" column="STATE"/>
  19. <result property="persId" column="PERS_ID"/>
  20. <result property="intm" column="INTM"/>
  21. </resultMap>
  22. <sql id="table_columns">
  23. UPTM,
  24. DATA_STAT,
  25. ID,
  26. RGSTR_ID,
  27. IS_AIL_CER,
  28. IS_ACH_UND,
  29. IS_SUB_BUS,
  30. IS_BEY_ENG,
  31. IS_PRO_SIG,
  32. IS_PRO_REP,
  33. IS_FAL_FAK,
  34. IS_STA_IMP,
  35. IS_SAM_STA,
  36. STATE,
  37. PERS_ID,
  38. INTM
  39. </sql>
  40. <sql id="entity_properties">
  41. #{uptm},
  42. #{dataStat},
  43. #{id},
  44. #{rgstrId},
  45. #{isAilCer},
  46. #{isAchUnd},
  47. #{isSubBus},
  48. #{isBeyEng},
  49. #{isProSig},
  50. #{isProRep},
  51. #{isFalFak},
  52. #{isStaImp},
  53. #{isSamSta},
  54. #{state},
  55. #{persId},
  56. #{intm}
  57. </sql>
  58. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  59. <sql id="page_where">
  60. <trim prefix="where" prefixOverrides="and | or ">
  61. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  62. <if test="id != null and id != ''">and ID = #{id}</if>
  63. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  64. <if test="isAilCer != null and isAilCer != ''">and IS_AIL_CER = #{isAilCer}</if>
  65. <if test="isAchUnd != null and isAchUnd != ''">and IS_ACH_UND = #{isAchUnd}</if>
  66. <if test="isSubBus != null and isSubBus != ''">and IS_SUB_BUS = #{isSubBus}</if>
  67. <if test="isBeyEng != null and isBeyEng != ''">and IS_BEY_ENG = #{isBeyEng}</if>
  68. <if test="isProSig != null and isProSig != ''">and IS_PRO_SIG = #{isProSig}</if>
  69. <if test="isProRep != null and isProRep != ''">and IS_PRO_REP = #{isProRep}</if>
  70. <if test="isFalFak != null and isFalFak != ''">and IS_FAL_FAK = #{isFalFak}</if>
  71. <if test="isStaImp != null and isStaImp != ''">and IS_STA_IMP = #{isStaImp}</if>
  72. <if test="isSamSta != null and isSamSta != ''">and IS_SAM_STA = #{isSamSta}</if>
  73. <if test="state != null and state != ''">and STATE = #{state}</if>
  74. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  75. <if test="intm != null">and INTM = #{intm}</if>
  76. </trim>
  77. </sql>
  78. <select id="get" resultMap="bisInspCdepBehResultMap" parameterType="String" >
  79. select <include refid="table_columns" /> from BIS_INSP_CDEP_BEH where RGSTR_ID = #{id}
  80. </select>
  81. <select id="getBy" resultMap="bisInspCdepBehResultMap">
  82. select <include refid="table_columns" /> from BIS_INSP_CDEP_BEH <include refid="page_where" />
  83. </select>
  84. <select id="findAll" resultMap="bisInspCdepBehResultMap">
  85. select <include refid="table_columns" /> from BIS_INSP_CDEP_BEH
  86. </select>
  87. <select id="findList" resultMap="bisInspCdepBehResultMap">
  88. select <include refid="table_columns" /> from BIS_INSP_CDEP_BEH <include refid="page_where" />
  89. </select>
  90. <select id="selectCount" resultType="int" >
  91. select count(ID) from BIS_INSP_CDEP_BEH <include refid="page_where" />
  92. </select>
  93. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspCdepBeh">
  94. insert into BIS_INSP_CDEP_BEH( <include refid="table_columns" /> )
  95. values ( <include refid="entity_properties" /> )
  96. </insert>
  97. <delete id="delete" parameterType="java.lang.String">
  98. update BIS_INSP_CDEP_BEH set DATA_STAT='9' where ID = #{id}
  99. </delete>
  100. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspCdepBeh">
  101. delete from BIS_INSP_CDEP_BEH <include refid="page_where" />
  102. </delete>
  103. <update id="deleteInFlag" parameterType="java.lang.String">
  104. update BIS_INSP_CDEP_BEH set flag_valid = 0 where ID = #{id}
  105. </update>
  106. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspCdepBeh">
  107. update BIS_INSP_CDEP_BEH
  108. <trim prefix="set" suffixOverrides=",">
  109. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  110. <if test="id != null and id != ''">ID = #{id},</if>
  111. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  112. <if test="isAilCer != null and isAilCer != ''">IS_AIL_CER = #{isAilCer},</if>
  113. <if test="isAchUnd != null and isAchUnd != ''">IS_ACH_UND = #{isAchUnd},</if>
  114. <if test="isSubBus != null and isSubBus != ''">IS_SUB_BUS = #{isSubBus},</if>
  115. <if test="isBeyEng != null and isBeyEng != ''">IS_BEY_ENG = #{isBeyEng},</if>
  116. <if test="isProSig != null and isProSig != ''">IS_PRO_SIG = #{isProSig},</if>
  117. <if test="isProRep != null and isProRep != ''">IS_PRO_REP = #{isProRep},</if>
  118. <if test="isFalFak != null and isFalFak != ''">IS_FAL_FAK = #{isFalFak},</if>
  119. <if test="isStaImp != null and isStaImp != ''">IS_STA_IMP = #{isStaImp},</if>
  120. <if test="isSamSta != null and isSamSta != ''">IS_SAM_STA = #{isSamSta},</if>
  121. <if test="state != null and state != ''">STATE = #{state},</if>
  122. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  123. <if test="intm != null">INTM = #{intm},</if>
  124. </trim>
  125. <where>ID = #{id}</where>
  126. </update>
  127. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspCdepBeh">
  128. update BIS_INSP_CDEP_BEH
  129. <trim prefix="set" suffixOverrides=",">
  130. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  131. <if test="id != null and id != ''">ID = #{id},</if>
  132. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  133. <if test="isAilCer != null and isAilCer != ''">IS_AIL_CER = #{isAilCer},</if>
  134. <if test="isAchUnd != null and isAchUnd != ''">IS_ACH_UND = #{isAchUnd},</if>
  135. <if test="isSubBus != null and isSubBus != ''">IS_SUB_BUS = #{isSubBus},</if>
  136. <if test="isBeyEng != null and isBeyEng != ''">IS_BEY_ENG = #{isBeyEng},</if>
  137. <if test="isProSig != null and isProSig != ''">IS_PRO_SIG = #{isProSig},</if>
  138. <if test="isProRep != null and isProRep != ''">IS_PRO_REP = #{isProRep},</if>
  139. <if test="isFalFak != null and isFalFak != ''">IS_FAL_FAK = #{isFalFak},</if>
  140. <if test="isStaImp != null and isStaImp != ''">IS_STA_IMP = #{isStaImp},</if>
  141. <if test="isSamSta != null and isSamSta != ''">IS_SAM_STA = #{isSamSta},</if>
  142. <if test="state != null and state != ''">STATE = #{state},</if>
  143. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  144. <if test="intm != null">INTM = #{intm},</if>
  145. </trim>
  146. <include refid="page_where" />
  147. </update>
  148. <!-- 其他自定义SQL -->
  149. </mapper>