BisInspRectLogProvinceDao.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  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.BisInspRectLogProvinceDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRectLogProvince" id="bisInspRectLogProvinceResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rectId" column="RECT_ID"/>
  7. <result property="actionDes" column="ACTION_DES"/>
  8. <result property="note" column="NOTE"/>
  9. <result property="state" column="STATE"/>
  10. <result property="orgId" column="ORG_ID"/>
  11. <result property="orgName" column="ORG_NAME"/>
  12. <result property="persId" column="PERS_ID"/>
  13. <result property="persName" column="PERS_NAME"/>
  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. RECT_ID,
  21. ACTION_DES,
  22. NOTE,
  23. STATE,
  24. ORG_ID,
  25. ORG_NAME,
  26. PERS_ID,
  27. PERS_NAME,
  28. INTM,
  29. UPTM,
  30. DATA_STAT
  31. </sql>
  32. <sql id="entity_properties">
  33. #{id},
  34. #{rectId},
  35. #{actionDes},
  36. #{note},
  37. #{state},
  38. #{orgId},
  39. #{orgName},
  40. #{persId},
  41. #{persName},
  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="rectId != null and rectId != ''">and RECT_ID = #{rectId}</if>
  50. <if test="actionDes != null and actionDes != ''">and ACTION_DES = #{actionDes}</if>
  51. <if test="note != null and note != ''">and NOTE = #{note}</if>
  52. <if test="state != null and state != ''">and STATE = #{state}</if>
  53. <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
  54. <if test="orgName != null and orgName != ''">and ORG_NAME = #{orgName}</if>
  55. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  56. <if test="persName != null and persName != ''">and PERS_NAME = #{persName}</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. and DATA_STAT='0'
  61. </trim>
  62. </sql>
  63. <select id="get" resultMap="bisInspRectLogProvinceResultMap" parameterType="String">
  64. select
  65. <include refid="table_columns"/>
  66. from BIS_INSP_RECT_LOG_PROVINCE where ID = #{id}
  67. </select>
  68. <select id="getBy" resultMap="bisInspRectLogProvinceResultMap">
  69. select
  70. <include refid="table_columns"/>
  71. from BIS_INSP_RECT_LOG_PROVINCE
  72. <include refid="page_where"/>
  73. </select>
  74. <select id="findAll" resultMap="bisInspRectLogProvinceResultMap">
  75. select
  76. <include refid="table_columns"/>
  77. from BIS_INSP_RECT_LOG_PROVINCE
  78. </select>
  79. <select id="findList" resultMap="bisInspRectLogProvinceResultMap">
  80. select
  81. <include refid="table_columns"/>
  82. from BIS_INSP_RECT_LOG_PROVINCE
  83. <include refid="page_where"/>
  84. order by intm
  85. </select>
  86. <select id="selectCount" resultType="int">
  87. select count(ID) from BIS_INSP_RECT_LOG_PROVINCE
  88. <include refid="page_where"/>
  89. </select>
  90. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectLogProvince">
  91. insert into BIS_INSP_RECT_LOG_PROVINCE(
  92. <include refid="table_columns"/>
  93. )
  94. values (
  95. <include refid="entity_properties"/>
  96. )
  97. </insert>
  98. <delete id="delete" parameterType="java.lang.String">
  99. update BIS_INSP_RECT_LOG_PROVINCE set DATA_STAT='9' where ID = #{id}
  100. </delete>
  101. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectLogProvince">
  102. update BIS_INSP_RECT_LOG_PROVINCE set DATA_STAT='9'
  103. <include refid="page_where"/>
  104. </delete>
  105. <update id="deleteInFlag" parameterType="java.lang.String">
  106. update BIS_INSP_RECT_LOG_PROVINCE set DATA_STAT = '9' where ID = #{id}
  107. </update>
  108. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectLogProvince">
  109. update BIS_INSP_RECT_LOG_PROVINCE
  110. <trim prefix="set" suffixOverrides=",">
  111. <if test="rectId != null and rectId != ''">RECT_ID = #{rectId},</if>
  112. <if test="actionDes != null and actionDes != ''">ACTION_DES = #{actionDes},</if>
  113. <if test="note != null and note != ''">NOTE = #{note},</if>
  114. <if test="state != null and state != ''">STATE = #{state},</if>
  115. <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
  116. <if test="orgName != null and orgName != ''">ORG_NAME = #{orgName},</if>
  117. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  118. <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
  119. <if test="intm != null">INTM = #{intm},</if>
  120. <if test="uptm != null">UPTM = #{uptm},</if>
  121. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  122. </trim>
  123. <where>ID = #{id}</where>
  124. </update>
  125. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectLogProvince">
  126. update BIS_INSP_RECT_LOG_PROVINCE
  127. <trim prefix="set" suffixOverrides=",">
  128. <if test="rectId != null and rectId != ''">RECT_ID = #{rectId},</if>
  129. <if test="actionDes != null and actionDes != ''">ACTION_DES = #{actionDes},</if>
  130. <if test="note != null and note != ''">NOTE = #{note},</if>
  131. <if test="state != null and state != ''">STATE = #{state},</if>
  132. <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
  133. <if test="orgName != null and orgName != ''">ORG_NAME = #{orgName},</if>
  134. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  135. <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
  136. <if test="intm != null">INTM = #{intm},</if>
  137. <if test="uptm != null">UPTM = #{uptm},</if>
  138. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  139. </trim>
  140. <include refid="page_where"/>
  141. </update>
  142. <!-- 其他自定义SQL -->
  143. </mapper>