BisInspFjpjlglCimtDao.xml 5.7 KB

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