BisInspGrowDrouDao.xml 6.8 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.BisInspGrowDrouDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspGrowDrou" id="bisInspGrowDrouResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isDrawPump" column="IS_DRAW_PUMP"/>
  8. <result property="isDisCab" column="IS_DIS_CAB"/>
  9. <result property="isDisBox" column="IS_DIS_BOX"/>
  10. <result property="isSealWell" column="IS_SEAL_WELL"/>
  11. <result property="isCoorIden" column="IS_COOR_IDEN"/>
  12. <result property="isEstabCard" column="IS_ESTAB_CARD"/>
  13. <result property="isDrouPro" column="IS_DROU_PRO"/>
  14. <result property="state" column="STATE"/>
  15. <result property="persId" column="PERS_ID"/>
  16. <result property="intm" column="INTM"/>
  17. <result property="uptm" column="UPTM"/>
  18. <result property="dataStat" column="DATA_STAT"/>
  19. </resultMap>
  20. <sql id="table_columns">
  21. ID,
  22. RGSTR_ID,
  23. IS_DRAW_PUMP,
  24. IS_DIS_CAB,
  25. IS_DIS_BOX,
  26. IS_SEAL_WELL,
  27. IS_COOR_IDEN,
  28. IS_ESTAB_CARD,
  29. IS_DROU_PRO,
  30. STATE,
  31. PERS_ID,
  32. INTM,
  33. UPTM,
  34. DATA_STAT
  35. </sql>
  36. <sql id="entity_properties">
  37. #{id},
  38. #{rgstrId},
  39. #{isDrawPump},
  40. #{isDisCab},
  41. #{isDisBox},
  42. #{isSealWell},
  43. #{isCoorIden},
  44. #{isEstabCard},
  45. #{isDrouPro},
  46. #{state},
  47. #{persId},
  48. #{intm},
  49. #{uptm},
  50. #{dataStat}
  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="isDrawPump != null and isDrawPump != ''">and IS_DRAW_PUMP = #{isDrawPump}</if>
  57. <if test="isDisCab != null and isDisCab != ''">and IS_DIS_CAB = #{isDisCab}</if>
  58. <if test="isDisBox != null and isDisBox != ''">and IS_DIS_BOX = #{isDisBox}</if>
  59. <if test="isSealWell != null and isSealWell != ''">and IS_SEAL_WELL = #{isSealWell}</if>
  60. <if test="isCoorIden != null and isCoorIden != ''">and IS_COOR_IDEN = #{isCoorIden}</if>
  61. <if test="isEstabCard != null and isEstabCard != ''">and IS_ESTAB_CARD = #{isEstabCard}</if>
  62. <if test="isDrouPro != null and isDrouPro != ''">and IS_DROU_PRO = #{isDrouPro}</if>
  63. <if test="state != null and state != ''">and STATE = #{state}</if>
  64. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  65. <if test="intm != null">and INTM = #{intm}</if>
  66. <if test="uptm != null">and UPTM = #{uptm}</if>
  67. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  68. </trim>
  69. </sql>
  70. <select id="get" resultMap="bisInspGrowDrouResultMap" parameterType="String" >
  71. select <include refid="table_columns" /> from BIS_INSP_GROW_DROU where RGSTR_ID = #{id}
  72. </select>
  73. <select id="getBy" resultMap="bisInspGrowDrouResultMap">
  74. select <include refid="table_columns" /> from BIS_INSP_GROW_DROU <include refid="page_where" />
  75. </select>
  76. <select id="findAll" resultMap="bisInspGrowDrouResultMap">
  77. select <include refid="table_columns" /> from BIS_INSP_GROW_DROU
  78. </select>
  79. <select id="findList" resultMap="bisInspGrowDrouResultMap">
  80. select <include refid="table_columns" /> from BIS_INSP_GROW_DROU <include refid="page_where" />
  81. </select>
  82. <select id="selectCount" resultType="int" >
  83. select count(ID) from BIS_INSP_GROW_DROU <include refid="page_where" />
  84. </select>
  85. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspGrowDrou">
  86. insert into BIS_INSP_GROW_DROU( <include refid="table_columns" /> )
  87. values ( <include refid="entity_properties" /> )
  88. </insert>
  89. <delete id="delete" parameterType="java.lang.String">
  90. update BIS_INSP_GROW_DROU set DATA_STAT='9' where ID = #{id}
  91. </delete>
  92. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspGrowDrou">
  93. delete from BIS_INSP_GROW_DROU <include refid="page_where" />
  94. </delete>
  95. <update id="deleteInFlag" parameterType="java.lang.String">
  96. update BIS_INSP_GROW_DROU set flag_valid = 0 where ID = #{id}
  97. </update>
  98. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspGrowDrou">
  99. update BIS_INSP_GROW_DROU
  100. <trim prefix="set" suffixOverrides=",">
  101. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  102. <if test="isDrawPump != null and isDrawPump != ''">IS_DRAW_PUMP = #{isDrawPump},</if>
  103. <if test="isDisCab != null and isDisCab != ''">IS_DIS_CAB = #{isDisCab},</if>
  104. <if test="isDisBox != null and isDisBox != ''">IS_DIS_BOX = #{isDisBox},</if>
  105. <if test="isSealWell != null and isSealWell != ''">IS_SEAL_WELL = #{isSealWell},</if>
  106. <if test="isCoorIden != null and isCoorIden != ''">IS_COOR_IDEN = #{isCoorIden},</if>
  107. <if test="isEstabCard != null and isEstabCard != ''">IS_ESTAB_CARD = #{isEstabCard},</if>
  108. <if test="isDrouPro != null and isDrouPro != ''">IS_DROU_PRO = #{isDrouPro},</if>
  109. <if test="state != null and state != ''">STATE = #{state},</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. </trim>
  115. <where>ID = #{id}</where>
  116. </update>
  117. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspGrowDrou">
  118. update BIS_INSP_GROW_DROU
  119. <trim prefix="set" suffixOverrides=",">
  120. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  121. <if test="isDrawPump != null and isDrawPump != ''">IS_DRAW_PUMP = #{isDrawPump},</if>
  122. <if test="isDisCab != null and isDisCab != ''">IS_DIS_CAB = #{isDisCab},</if>
  123. <if test="isDisBox != null and isDisBox != ''">IS_DIS_BOX = #{isDisBox},</if>
  124. <if test="isSealWell != null and isSealWell != ''">IS_SEAL_WELL = #{isSealWell},</if>
  125. <if test="isCoorIden != null and isCoorIden != ''">IS_COOR_IDEN = #{isCoorIden},</if>
  126. <if test="isEstabCard != null and isEstabCard != ''">IS_ESTAB_CARD = #{isEstabCard},</if>
  127. <if test="isDrouPro != null and isDrouPro != ''">IS_DROU_PRO = #{isDrouPro},</if>
  128. <if test="state != null and state != ''">STATE = #{state},</if>
  129. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  130. <if test="intm != null">INTM = #{intm},</if>
  131. <if test="uptm != null">UPTM = #{uptm},</if>
  132. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  133. </trim>
  134. <include refid="page_where" />
  135. </update>
  136. <!-- 其他自定义SQL -->
  137. </mapper>