PayFeeConfigV1ServiceDaoImplMapper.xml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="payFeeConfigV1ServiceDaoImpl">
  6. <!-- 保存收费项目信息 add by wuxw 2018-07-03 -->
  7. <insert id="savePayFeeConfigInfo" parameterType="Map">
  8. insert into pay_fee_config(
  9. fee_type_cd,computing_formula,additional_amount,bill_type,computing_formula_text,square_price,payment_cd,is_default,config_id,fee_flag,fee_name,payment_cycle,start_time,end_time,community_id,deduct_from
  10. ) values (
  11. #{feeTypeCd},#{computingFormula},#{additionalAmount},#{billType},#{computingFormulaText},#{squarePrice},#{paymentCd},#{isDefault},#{configId},#{feeFlag},#{feeName},#{paymentCycle},#{startTime},#{endTime},#{communityId},#{deductFrom}
  12. )
  13. </insert>
  14. <!-- 查询收费项目信息 add by wuxw 2018-07-03 -->
  15. <select id="getPayFeeConfigInfo" parameterType="Map" resultType="Map">
  16. select t.fee_type_cd,t.fee_type_cd feeTypeCd,t.computing_formula,t.computing_formula
  17. computingFormula,t.additional_amount,t.additional_amount additionalAmount,t.bill_type,t.bill_type
  18. billType,t.computing_formula_text,t.computing_formula_text computingFormulaText,t.status_cd,t.status_cd
  19. statusCd,t.square_price,t.square_price squarePrice,t.payment_cd,t.payment_cd paymentCd,t.is_default,t.is_default
  20. isDefault,t.config_id,t.config_id configId,t.fee_flag,t.fee_flag feeFlag,t.fee_name,t.fee_name
  21. feeName,t.payment_cycle,t.payment_cycle paymentCycle,t.start_time,t.start_time startTime,t.end_time,t.end_time
  22. endTime,t.community_id,t.community_id communityId,t.deduct_from,t.deduct_from deductFrom
  23. from pay_fee_config t
  24. where 1 =1
  25. <if test="feeTypeCd !=null and feeTypeCd != ''">
  26. and t.fee_type_cd= #{feeTypeCd}
  27. </if>
  28. <if test="computingFormula !=null and computingFormula != ''">
  29. and t.computing_formula= #{computingFormula}
  30. </if>
  31. <if test="additionalAmount !=null and additionalAmount != ''">
  32. and t.additional_amount= #{additionalAmount}
  33. </if>
  34. <if test="billType !=null and billType != ''">
  35. and t.bill_type= #{billType}
  36. </if>
  37. <if test="computingFormulaText !=null and computingFormulaText != ''">
  38. and t.computing_formula_text= #{computingFormulaText}
  39. </if>
  40. <if test="statusCd !=null and statusCd != ''">
  41. and t.status_cd= #{statusCd}
  42. </if>
  43. <if test="squarePrice !=null and squarePrice != ''">
  44. and t.square_price= #{squarePrice}
  45. </if>
  46. <if test="paymentCd !=null and paymentCd != ''">
  47. and t.payment_cd= #{paymentCd}
  48. </if>
  49. <if test="isDefault !=null and isDefault != ''">
  50. and t.is_default= #{isDefault}
  51. </if>
  52. <if test="configId !=null and configId != ''">
  53. and t.config_id= #{configId}
  54. </if>
  55. <if test="configIds != null">
  56. and t.config_id in
  57. <foreach collection="configIds" open="(" close=")"
  58. separator="," item="item">
  59. #{item}
  60. </foreach>
  61. </if>
  62. <if test="feeFlag !=null and feeFlag != ''">
  63. and t.fee_flag= #{feeFlag}
  64. </if>
  65. <if test="feeName !=null and feeName != ''">
  66. and t.fee_name= #{feeName}
  67. </if>
  68. <if test="paymentCycle !=null and paymentCycle != ''">
  69. and t.payment_cycle= #{paymentCycle}
  70. </if>
  71. <if test="startTime !=null and startTime != ''">
  72. and t.start_time= #{startTime}
  73. </if>
  74. <if test="endTime !=null and endTime != ''">
  75. and t.end_time= #{endTime}
  76. </if>
  77. <if test="communityId !=null and communityId != ''">
  78. and t.community_id= #{communityId}
  79. </if>
  80. <if test="deductFrom !=null and deductFrom != ''">
  81. and t.deduct_from = #{deductFrom}
  82. </if>
  83. order by t.create_time desc
  84. <if test="page != -1 and page != null ">
  85. limit #{page}, #{row}
  86. </if>
  87. </select>
  88. <!-- 修改收费项目信息 add by wuxw 2018-07-03 -->
  89. <update id="updatePayFeeConfigInfo" parameterType="Map">
  90. update pay_fee_config t set t.status_cd = #{statusCd}
  91. <if test="newBId != null and newBId != ''">
  92. ,t.b_id = #{newBId}
  93. </if>
  94. <if test="feeTypeCd !=null and feeTypeCd != ''">
  95. , t.fee_type_cd= #{feeTypeCd}
  96. </if>
  97. <if test="computingFormula !=null and computingFormula != ''">
  98. , t.computing_formula= #{computingFormula}
  99. </if>
  100. <if test="additionalAmount !=null and additionalAmount != ''">
  101. , t.additional_amount= #{additionalAmount}
  102. </if>
  103. <if test="billType !=null and billType != ''">
  104. , t.bill_type= #{billType}
  105. </if>
  106. <if test="computingFormulaText !=null and computingFormulaText != ''">
  107. , t.computing_formula_text= #{computingFormulaText}
  108. </if>
  109. <if test="squarePrice !=null and squarePrice != ''">
  110. , t.square_price= #{squarePrice}
  111. </if>
  112. <if test="paymentCd !=null and paymentCd != ''">
  113. , t.payment_cd= #{paymentCd}
  114. </if>
  115. <if test="isDefault !=null and isDefault != ''">
  116. , t.is_default= #{isDefault}
  117. </if>
  118. <if test="feeFlag !=null and feeFlag != ''">
  119. , t.fee_flag= #{feeFlag}
  120. </if>
  121. <if test="feeName !=null and feeName != ''">
  122. , t.fee_name= #{feeName}
  123. </if>
  124. <if test="paymentCycle !=null and paymentCycle != ''">
  125. , t.payment_cycle= #{paymentCycle}
  126. </if>
  127. <if test="startTime !=null and startTime != ''">
  128. , t.start_time= #{startTime}
  129. </if>
  130. <if test="endTime !=null and endTime != ''">
  131. , t.end_time= #{endTime}
  132. </if>
  133. <if test="communityId !=null and communityId != ''">
  134. , t.community_id= #{communityId}
  135. </if>
  136. <if test="deductFrom !=null and deductFrom != ''">
  137. , t.deduct_from= #{deductFrom}
  138. </if>
  139. where 1=1
  140. <if test="configId !=null and configId != ''">
  141. and t.config_id= #{configId}
  142. </if>
  143. </update>
  144. <!-- 查询收费项目数量 add by wuxw 2018-07-03 -->
  145. <select id="queryPayFeeConfigsCount" parameterType="Map" resultType="Map">
  146. select count(1) count
  147. from pay_fee_config t
  148. where 1 =1
  149. <if test="feeTypeCd !=null and feeTypeCd != ''">
  150. and t.fee_type_cd= #{feeTypeCd}
  151. </if>
  152. <if test="computingFormula !=null and computingFormula != ''">
  153. and t.computing_formula= #{computingFormula}
  154. </if>
  155. <if test="additionalAmount !=null and additionalAmount != ''">
  156. and t.additional_amount= #{additionalAmount}
  157. </if>
  158. <if test="billType !=null and billType != ''">
  159. and t.bill_type= #{billType}
  160. </if>
  161. <if test="computingFormulaText !=null and computingFormulaText != ''">
  162. and t.computing_formula_text= #{computingFormulaText}
  163. </if>
  164. <if test="statusCd !=null and statusCd != ''">
  165. and t.status_cd= #{statusCd}
  166. </if>
  167. <if test="squarePrice !=null and squarePrice != ''">
  168. and t.square_price= #{squarePrice}
  169. </if>
  170. <if test="paymentCd !=null and paymentCd != ''">
  171. and t.payment_cd= #{paymentCd}
  172. </if>
  173. <if test="isDefault !=null and isDefault != ''">
  174. and t.is_default= #{isDefault}
  175. </if>
  176. <if test="configId !=null and configId != ''">
  177. and t.config_id= #{configId}
  178. </if>
  179. <if test="configIds !=null">
  180. and t.config_id in
  181. <foreach collection="configIds" open="(" close=")"
  182. separator="," item="item">
  183. #{item}
  184. </foreach>
  185. </if>
  186. <if test="feeFlag !=null and feeFlag != ''">
  187. and t.fee_flag= #{feeFlag}
  188. </if>
  189. <if test="feeName !=null and feeName != ''">
  190. and t.fee_name= #{feeName}
  191. </if>
  192. <if test="paymentCycle !=null and paymentCycle != ''">
  193. and t.payment_cycle= #{paymentCycle}
  194. </if>
  195. <if test="startTime !=null and startTime != ''">
  196. and t.start_time= #{startTime}
  197. </if>
  198. <if test="endTime !=null and endTime != ''">
  199. and t.end_time= #{endTime}
  200. </if>
  201. <if test="communityId !=null and communityId != ''">
  202. and t.community_id= #{communityId}
  203. </if>
  204. <if test="deductFrom !=null and deductFrom != ''">
  205. and t.deduct_from = #{deductFrom}
  206. </if>
  207. </select>
  208. </mapper>