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