BisInspFjaccpAmDao.xml 6.1 KB

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