PayFeeDetailNewV1ServiceDaoImplMapper.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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="payFeeDetailNewV1ServiceDaoImpl">
  6. <!-- 保存费用明细信息 add by wuxw 2018-07-03 -->
  7. <insert id="savePayFeeDetailNewInfo" parameterType="Map">
  8. insert into pay_fee_detail(
  9. prime_rate,detail_id,receivable_amount,cycles,remark,start_time,received_amount,state,end_time,community_id,fee_id,b_id
  10. ) values (
  11. #{primeRate},#{detailId},#{receivableAmount},#{cycles},#{remark},#{startTime},#{receivedAmount},#{state},#{endTime},#{communityId},#{feeId},#{bId}
  12. )
  13. </insert>
  14. <!-- 查询费用明细信息 add by wuxw 2018-07-03 -->
  15. <select id="getPayFeeDetailNewInfo" parameterType="Map" resultType="Map">
  16. select t.prime_rate,t.prime_rate primeRate,t.detail_id,t.detail_id
  17. detailId,t.receivable_amount,t.receivable_amount receivableAmount,t.cycles,t.remark,t.status_cd,t.status_cd
  18. statusCd,t.start_time,t.start_time startTime,t.received_amount,t.received_amount
  19. receivedAmount,t.state,t.end_time,t.end_time endTime,t.community_id,t.community_id communityId,t.fee_id,t.fee_id
  20. feeId
  21. from pay_fee_detail t
  22. where 1 =1
  23. <if test="primeRate !=null and primeRate != ''">
  24. and t.prime_rate= #{primeRate}
  25. </if>
  26. <if test="detailId !=null and detailId != ''">
  27. and t.detail_id= #{detailId}
  28. </if>
  29. <if test="receivableAmount !=null and receivableAmount != ''">
  30. and t.receivable_amount= #{receivableAmount}
  31. </if>
  32. <if test="cycles !=null and cycles != ''">
  33. and t.cycles= #{cycles}
  34. </if>
  35. <if test="remark !=null and remark != ''">
  36. and t.remark= #{remark}
  37. </if>
  38. <if test="statusCd !=null and statusCd != ''">
  39. and t.status_cd= #{statusCd}
  40. </if>
  41. <if test="startTime !=null and startTime != ''">
  42. and t.start_time= #{startTime}
  43. </if>
  44. <if test="receivedAmount !=null and receivedAmount != ''">
  45. and t.received_amount= #{receivedAmount}
  46. </if>
  47. <if test="state !=null and state != ''">
  48. and t.state= #{state}
  49. </if>
  50. <if test="endTime !=null and endTime != ''">
  51. and t.end_time= #{endTime}
  52. </if>
  53. <if test="communityId !=null and communityId != ''">
  54. and t.community_id= #{communityId}
  55. </if>
  56. <if test="feeId !=null and feeId != ''">
  57. and t.fee_id= #{feeId}
  58. </if>
  59. order by t.create_time desc
  60. <if test="page != -1 and page != null ">
  61. limit #{page}, #{row}
  62. </if>
  63. </select>
  64. <!-- 修改费用明细信息 add by wuxw 2018-07-03 -->
  65. <update id="updatePayFeeDetailNewInfo" parameterType="Map">
  66. update pay_fee_detail t set t.status_cd = #{statusCd}
  67. <if test="newBId != null and newBId != ''">
  68. ,t.b_id = #{newBId}
  69. </if>
  70. <if test="primeRate !=null and primeRate != ''">
  71. , t.prime_rate= #{primeRate}
  72. </if>
  73. <if test="receivableAmount !=null and receivableAmount != ''">
  74. , t.receivable_amount= #{receivableAmount}
  75. </if>
  76. <if test="cycles !=null and cycles != ''">
  77. , t.cycles= #{cycles}
  78. </if>
  79. <if test="remark !=null and remark != ''">
  80. , t.remark= #{remark}
  81. </if>
  82. <if test="startTime !=null and startTime != ''">
  83. , t.start_time= #{startTime}
  84. </if>
  85. <if test="receivedAmount !=null and receivedAmount != ''">
  86. , t.received_amount= #{receivedAmount}
  87. </if>
  88. <if test="state !=null and state != ''">
  89. , t.state= #{state}
  90. </if>
  91. <if test="endTime !=null and endTime != ''">
  92. , t.end_time= #{endTime}
  93. </if>
  94. <if test="communityId !=null and communityId != ''">
  95. , t.community_id= #{communityId}
  96. </if>
  97. <if test="feeId !=null and feeId != ''">
  98. , t.fee_id= #{feeId}
  99. </if>
  100. where 1=1
  101. <if test="detailId !=null and detailId != ''">
  102. and t.detail_id= #{detailId}
  103. </if>
  104. </update>
  105. <!-- 查询费用明细数量 add by wuxw 2018-07-03 -->
  106. <select id="queryPayFeeDetailNewsCount" parameterType="Map" resultType="Map">
  107. select count(1) count
  108. from pay_fee_detail t
  109. where 1 =1
  110. <if test="primeRate !=null and primeRate != ''">
  111. and t.prime_rate= #{primeRate}
  112. </if>
  113. <if test="detailId !=null and detailId != ''">
  114. and t.detail_id= #{detailId}
  115. </if>
  116. <if test="receivableAmount !=null and receivableAmount != ''">
  117. and t.receivable_amount= #{receivableAmount}
  118. </if>
  119. <if test="cycles !=null and cycles != ''">
  120. and t.cycles= #{cycles}
  121. </if>
  122. <if test="remark !=null and remark != ''">
  123. and t.remark= #{remark}
  124. </if>
  125. <if test="statusCd !=null and statusCd != ''">
  126. and t.status_cd= #{statusCd}
  127. </if>
  128. <if test="startTime !=null and startTime != ''">
  129. and t.start_time= #{startTime}
  130. </if>
  131. <if test="receivedAmount !=null and receivedAmount != ''">
  132. and t.received_amount= #{receivedAmount}
  133. </if>
  134. <if test="state !=null and state != ''">
  135. and t.state= #{state}
  136. </if>
  137. <if test="endTime !=null and endTime != ''">
  138. and t.end_time= #{endTime}
  139. </if>
  140. <if test="communityId !=null and communityId != ''">
  141. and t.community_id= #{communityId}
  142. </if>
  143. <if test="feeId !=null and feeId != ''">
  144. and t.fee_id= #{feeId}
  145. </if>
  146. </select>
  147. </mapper>