PrestoreFeeServiceDaoImplMapper.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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="prestoreFeeServiceDaoImpl">
  6. <!-- 保存预存费用信息 add by wuxw 2018-07-03 -->
  7. <insert id="savePrestoreFeeInfo" parameterType="Map">
  8. insert into prestore_fee(
  9. prestore_fee_amount,reason,prestore_fee_obj_type,prestore_fee_id,remark,state,community_id,prestore_fee_type,room_id
  10. ) values (
  11. #{prestoreFeeAmount},#{reason},#{prestoreFeeObjType},#{prestoreFeeId},#{remark},#{state},#{communityId},#{prestoreFeeType},#{roomId}
  12. )
  13. </insert>
  14. <!-- 查询预存费用信息 add by wuxw 2018-07-03 -->
  15. <select id="getPrestoreFeeInfo" parameterType="Map" resultType="Map">
  16. select t.prestore_fee_amount,t.prestore_fee_amount prestoreFeeAmount,t.reason,t.prestore_fee_obj_type,t.prestore_fee_obj_type prestoreFeeObjType,t.prestore_fee_id,t.prestore_fee_id prestoreFeeId,t.remark,t.status_cd,t.status_cd statusCd,t.state,t.community_id,t.community_id communityId,t.prestore_fee_type,t.prestore_fee_type prestoreFeeType,t.room_id,t.room_id roomId
  17. from prestore_fee t
  18. where 1 =1
  19. <if test="prestoreFeeAmount !=null and prestoreFeeAmount != ''">
  20. and t.prestore_fee_amount= #{prestoreFeeAmount}
  21. </if>
  22. <if test="reason !=null and reason != ''">
  23. and t.reason= #{reason}
  24. </if>
  25. <if test="prestoreFeeObjType !=null and prestoreFeeObjType != ''">
  26. and t.prestore_fee_obj_type= #{prestoreFeeObjType}
  27. </if>
  28. <if test="prestoreFeeId !=null and prestoreFeeId != ''">
  29. and t.prestore_fee_id= #{prestoreFeeId}
  30. </if>
  31. <if test="remark !=null and remark != ''">
  32. and t.remark= #{remark}
  33. </if>
  34. <if test="statusCd !=null and statusCd != ''">
  35. and t.status_cd= #{statusCd}
  36. </if>
  37. <if test="state !=null and state != ''">
  38. and t.state= #{state}
  39. </if>
  40. <if test="communityId !=null and communityId != ''">
  41. and t.community_id= #{communityId}
  42. </if>
  43. <if test="prestoreFeeType !=null and prestoreFeeType != ''">
  44. and t.prestore_fee_type= #{prestoreFeeType}
  45. </if>
  46. <if test="roomId !=null and roomId != ''">
  47. and t.room_id= #{roomId}
  48. </if>
  49. order by t.create_time desc
  50. <if test="page != -1 and page != null ">
  51. limit #{page}, #{row}
  52. </if>
  53. </select>
  54. <!-- 修改预存费用信息 add by wuxw 2018-07-03 -->
  55. <update id="updatePrestoreFeeInfo" parameterType="Map">
  56. update prestore_fee t set t.status_cd = #{statusCd}
  57. <if test="newBId != null and newBId != ''">
  58. ,t.b_id = #{newBId}
  59. </if>
  60. <if test="prestoreFeeAmount !=null and prestoreFeeAmount != ''">
  61. , t.prestore_fee_amount= #{prestoreFeeAmount}
  62. </if>
  63. <if test="reason !=null and reason != ''">
  64. , t.reason= #{reason}
  65. </if>
  66. <if test="prestoreFeeObjType !=null and prestoreFeeObjType != ''">
  67. , t.prestore_fee_obj_type= #{prestoreFeeObjType}
  68. </if>
  69. <if test="remark !=null and remark != ''">
  70. , t.remark= #{remark}
  71. </if>
  72. <if test="state !=null and state != ''">
  73. , t.state= #{state}
  74. </if>
  75. <if test="communityId !=null and communityId != ''">
  76. , t.community_id= #{communityId}
  77. </if>
  78. <if test="prestoreFeeType !=null and prestoreFeeType != ''">
  79. , t.prestore_fee_type= #{prestoreFeeType}
  80. </if>
  81. <if test="roomId !=null and roomId != ''">
  82. , t.room_id= #{roomId}
  83. </if>
  84. where 1=1 <if test="prestoreFeeId !=null and prestoreFeeId != ''">
  85. and t.prestore_fee_id= #{prestoreFeeId}
  86. </if>
  87. </update>
  88. <!-- 查询预存费用数量 add by wuxw 2018-07-03 -->
  89. <select id="queryPrestoreFeesCount" parameterType="Map" resultType="Map">
  90. select count(1) count
  91. from prestore_fee t
  92. where 1 =1
  93. <if test="prestoreFeeAmount !=null and prestoreFeeAmount != ''">
  94. and t.prestore_fee_amount= #{prestoreFeeAmount}
  95. </if>
  96. <if test="reason !=null and reason != ''">
  97. and t.reason= #{reason}
  98. </if>
  99. <if test="prestoreFeeObjType !=null and prestoreFeeObjType != ''">
  100. and t.prestore_fee_obj_type= #{prestoreFeeObjType}
  101. </if>
  102. <if test="prestoreFeeId !=null and prestoreFeeId != ''">
  103. and t.prestore_fee_id= #{prestoreFeeId}
  104. </if>
  105. <if test="remark !=null and remark != ''">
  106. and t.remark= #{remark}
  107. </if>
  108. <if test="statusCd !=null and statusCd != ''">
  109. and t.status_cd= #{statusCd}
  110. </if>
  111. <if test="state !=null and state != ''">
  112. and t.state= #{state}
  113. </if>
  114. <if test="communityId !=null and communityId != ''">
  115. and t.community_id= #{communityId}
  116. </if>
  117. <if test="prestoreFeeType !=null and prestoreFeeType != ''">
  118. and t.prestore_fee_type= #{prestoreFeeType}
  119. </if>
  120. <if test="roomId !=null and roomId != ''">
  121. and t.room_id= #{roomId}
  122. </if>
  123. </select>
  124. </mapper>