BisInspAuditPlmbDao.xml 6.4 KB

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