400e15e890aa286fcbb1efc2aa13d20de12dfd3a.svn-base 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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.BisInspRsvrBenefitsRepeatDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsvrBenefits" id="bisInspRsvrBenefitsRepeatResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="ifEffective" column="IF_EFFECTIVE"/>
  8. <result property="ifWaterS" column="IF_WATER_S"/>
  9. <result property="wsfdws" column="WSFDWS"/>
  10. <result property="diskRunInfo" column="DISK_RUN_INFO"/>
  11. <result property="hasSetMainFl" column="HAS_SET_MAIN_FL"/>
  12. <result property="recPersId" column="REC_PERS_ID"/>
  13. <result property="recPers2" column="REC_PERS2"/>
  14. <result property="recPersTel" column="REC_PERS_TEL"/>
  15. <result property="createTime" column="CREATE_TIME"/>
  16. <result property="updateTime" column="UPDATE_TIME"/>
  17. <result property="status" column="STATUS"/>
  18. </resultMap>
  19. <sql id="table_columns">
  20. ID,
  21. RGSTR_ID,
  22. IF_EFFECTIVE,
  23. IF_WATER_S,
  24. WSFDWS,
  25. DISK_RUN_INFO,
  26. HAS_SET_MAIN_FL,
  27. REC_PERS_ID,
  28. REC_PERS2,
  29. REC_PERS_TEL,
  30. CREATE_TIME,
  31. UPDATE_TIME,
  32. STATUS
  33. </sql>
  34. <sql id="entity_properties">
  35. #{id},
  36. #{rgstrId},
  37. #{ifEffective},
  38. #{ifWaterS},
  39. #{wsfdws},
  40. #{diskRunInfo},
  41. #{hasSetMainFl},
  42. #{recPersId},
  43. #{recPers2},
  44. #{recPersTel},
  45. #{createTime},
  46. #{updateTime},
  47. #{status}
  48. </sql>
  49. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  50. <sql id="page_where">
  51. <trim prefix="where" prefixOverrides="and | or ">
  52. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  53. <if test="ifEffective != null and ifEffective != ''">and IF_EFFECTIVE = #{ifEffective}</if>
  54. <if test="ifWaterS != null and ifWaterS != ''">and IF_WATER_S = #{ifWaterS}</if>
  55. <if test="wsfdws != null and wsfdws != ''">and WSFDWS = #{wsfdws}</if>
  56. <if test="diskRunInfo != null and diskRunInfo != ''">and DISK_RUN_INFO = #{diskRunInfo}</if>
  57. <if test="hasSetMainFl != null and hasSetMainFl != ''">and HAS_SET_MAIN_FL = #{hasSetMainFl}</if>
  58. <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
  59. <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
  60. <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
  61. <if test="createTime != null">and CREATE_TIME = #{createTime}</if>
  62. <if test="updateTime != null">and UPDATE_TIME = #{updateTime}</if>
  63. <if test="status != null and status != ''">and STATUS = #{status}</if>
  64. </trim>
  65. </sql>
  66. <select id="get" resultMap="bisInspRsvrBenefitsRepeatResultMap" parameterType="String" >
  67. select <include refid="table_columns" /> from BIS_INSP_RSVR_BENEFITS_REPEAT where ID = #{id}
  68. </select>
  69. <select id="getBy" resultMap="bisInspRsvrBenefitsRepeatResultMap">
  70. select <include refid="table_columns" /> from BIS_INSP_RSVR_BENEFITS_REPEAT <include refid="page_where" />
  71. </select>
  72. <select id="findAll" resultMap="bisInspRsvrBenefitsRepeatResultMap">
  73. select <include refid="table_columns" /> from BIS_INSP_RSVR_BENEFITS_REPEAT
  74. </select>
  75. <select id="findList" resultMap="bisInspRsvrBenefitsRepeatResultMap">
  76. select <include refid="table_columns" /> from BIS_INSP_RSVR_BENEFITS_REPEAT <include refid="page_where" />
  77. </select>
  78. <select id="selectCount" resultType="int" >
  79. select count(ID) from BIS_INSP_RSVR_BENEFITS_REPEAT <include refid="page_where" />
  80. </select>
  81. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrBenefits">
  82. insert into BIS_INSP_RSVR_BENEFITS_REPEAT( <include refid="table_columns" /> )
  83. values ( <include refid="entity_properties" /> )
  84. </insert>
  85. <delete id="delete" parameterType="java.lang.String">
  86. delete from BIS_INSP_RSVR_BENEFITS_REPEAT where ID = #{id}
  87. </delete>
  88. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrBenefits">
  89. delete from BIS_INSP_RSVR_BENEFITS_REPEAT <include refid="page_where" />
  90. </delete>
  91. <update id="deleteInFlag" parameterType="java.lang.String">
  92. update BIS_INSP_RSVR_BENEFITS_REPEAT set flag_valid = 0 where ID = #{id}
  93. </update>
  94. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrBenefits">
  95. update BIS_INSP_RSVR_BENEFITS_REPEAT
  96. <trim prefix="set" suffixOverrides=",">
  97. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  98. <if test="ifEffective != null and ifEffective != ''">IF_EFFECTIVE = #{ifEffective},</if>
  99. <if test="ifWaterS != null and ifWaterS != ''">IF_WATER_S = #{ifWaterS},</if>
  100. <if test="wsfdws != null and wsfdws != ''">WSFDWS = #{wsfdws},</if>
  101. <if test="diskRunInfo != null and diskRunInfo != ''">DISK_RUN_INFO = #{diskRunInfo},</if>
  102. <if test="hasSetMainFl != null and hasSetMainFl != ''">HAS_SET_MAIN_FL = #{hasSetMainFl},</if>
  103. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  104. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  105. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  106. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  107. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  108. <if test="status != null and status != ''">STATUS = #{status},</if>
  109. </trim>
  110. <where>ID = #{id}</where>
  111. </update>
  112. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrBenefits">
  113. update BIS_INSP_RSVR_BENEFITS_REPEAT
  114. <trim prefix="set" suffixOverrides=",">
  115. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  116. <if test="ifEffective != null and ifEffective != ''">IF_EFFECTIVE = #{ifEffective},</if>
  117. <if test="ifWaterS != null and ifWaterS != ''">IF_WATER_S = #{ifWaterS},</if>
  118. <if test="wsfdws != null and wsfdws != ''">WSFDWS = #{wsfdws},</if>
  119. <if test="diskRunInfo != null and diskRunInfo != ''">DISK_RUN_INFO = #{diskRunInfo},</if>
  120. <if test="hasSetMainFl != null and hasSetMainFl != ''">HAS_SET_MAIN_FL = #{hasSetMainFl},</if>
  121. <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
  122. <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
  123. <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
  124. <if test="createTime != null">CREATE_TIME = #{createTime},</if>
  125. <if test="updateTime != null">UPDATE_TIME = #{updateTime},</if>
  126. <if test="status != null and status != ''">STATUS = #{status},</if>
  127. </trim>
  128. <include refid="page_where" />
  129. </update>
  130. <!-- 其他自定义SQL -->
  131. </mapper>