BisInspWrwsRgstrSvwtcDao.xml 7.4 KB

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