BisInspFjaccpEmDao.xml 6.2 KB

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