IntegralRuleFeeV1ServiceDaoImplMapper.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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="integralRuleFeeV1ServiceDaoImpl">
  6. <!-- 保存积分规则费用信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveIntegralRuleFeeInfo" parameterType="Map">
  8. insert into integral_rule_fee(
  9. pay_month,irf_id,fee_config_name,pay_start_time,pay_end_time,rule_id,community_id,fee_config_id
  10. ) values (
  11. #{payMonth},#{irfId},#{feeConfigName},#{payStartTime},#{payEndTime},#{ruleId},#{communityId},#{feeConfigId}
  12. )
  13. </insert>
  14. <!-- 查询积分规则费用信息 add by wuxw 2018-07-03 -->
  15. <select id="getIntegralRuleFeeInfo" parameterType="Map" resultType="Map">
  16. select t.pay_month,t.pay_month payMonth,t.irf_id,t.irf_id irfId,t.fee_config_name,t.fee_config_name
  17. feeConfigName,t.pay_start_time,t.pay_start_time payStartTime,t.pay_end_time,t.pay_end_time
  18. payEndTime,t.status_cd,t.status_cd statusCd,t.rule_id,t.rule_id ruleId,t.community_id,t.community_id
  19. communityId,t.fee_config_id,t.fee_config_id feeConfigId
  20. from integral_rule_fee t
  21. where 1 =1
  22. <if test="payMonth !=null and payMonth != ''">
  23. and t.pay_month= #{payMonth}
  24. </if>
  25. <if test="cycle !=null and cycle != ''">
  26. and t.pay_month &lt;= #{cycle}
  27. </if>
  28. <if test="irfId !=null and irfId != ''">
  29. and t.irf_id= #{irfId}
  30. </if>
  31. <if test="feeConfigName !=null and feeConfigName != ''">
  32. and t.fee_config_name= #{feeConfigName}
  33. </if>
  34. <if test="payStartTime !=null and payStartTime != ''">
  35. and t.pay_start_time= #{payStartTime}
  36. </if>
  37. <if test="payEndTime !=null and payEndTime != ''">
  38. and t.pay_end_time= #{payEndTime}
  39. </if>
  40. <if test="curTime !=null and curTime != ''">
  41. and t.pay_start_time &lt; #{curTime}
  42. and t.pay_end_time &gt; #{curTime}
  43. </if>
  44. <if test="statusCd !=null and statusCd != ''">
  45. and t.status_cd= #{statusCd}
  46. </if>
  47. <if test="ruleId !=null and ruleId != ''">
  48. and t.rule_id= #{ruleId}
  49. </if>
  50. <if test="communityId !=null and communityId != ''">
  51. and t.community_id= #{communityId}
  52. </if>
  53. <if test="feeConfigId !=null and feeConfigId != ''">
  54. and t.fee_config_id= #{feeConfigId}
  55. </if>
  56. order by t.create_time desc
  57. <if test="page != -1 and page != null ">
  58. limit #{page}, #{row}
  59. </if>
  60. </select>
  61. <!-- 修改积分规则费用信息 add by wuxw 2018-07-03 -->
  62. <update id="updateIntegralRuleFeeInfo" parameterType="Map">
  63. update integral_rule_fee t set t.status_cd = #{statusCd}
  64. <if test="newBId != null and newBId != ''">
  65. ,t.b_id = #{newBId}
  66. </if>
  67. <if test="payMonth !=null and payMonth != ''">
  68. , t.pay_month= #{payMonth}
  69. </if>
  70. <if test="feeConfigName !=null and feeConfigName != ''">
  71. , t.fee_config_name= #{feeConfigName}
  72. </if>
  73. <if test="payStartTime !=null and payStartTime != ''">
  74. , t.pay_start_time= #{payStartTime}
  75. </if>
  76. <if test="payEndTime !=null and payEndTime != ''">
  77. , t.pay_end_time= #{payEndTime}
  78. </if>
  79. <if test="ruleId !=null and ruleId != ''">
  80. , t.rule_id= #{ruleId}
  81. </if>
  82. <if test="feeConfigId !=null and feeConfigId != ''">
  83. , t.fee_config_id= #{feeConfigId}
  84. </if>
  85. where 1=1
  86. <if test="irfId !=null and irfId != ''">
  87. and t.irf_id= #{irfId}
  88. </if>
  89. <if test="communityId !=null and communityId != ''">
  90. and t.community_id= #{communityId}
  91. </if>
  92. </update>
  93. <!-- 查询积分规则费用数量 add by wuxw 2018-07-03 -->
  94. <select id="queryIntegralRuleFeesCount" parameterType="Map" resultType="Map">
  95. select count(1) count
  96. from integral_rule_fee t
  97. where 1 =1
  98. <if test="payMonth !=null and payMonth != ''">
  99. and t.pay_month= #{payMonth}
  100. </if>
  101. <if test="cycle !=null and cycle != ''">
  102. and t.pay_month &lt;= #{cycle}
  103. </if>
  104. <if test="irfId !=null and irfId != ''">
  105. and t.irf_id= #{irfId}
  106. </if>
  107. <if test="feeConfigName !=null and feeConfigName != ''">
  108. and t.fee_config_name= #{feeConfigName}
  109. </if>
  110. <if test="payStartTime !=null and payStartTime != ''">
  111. and t.pay_start_time= #{payStartTime}
  112. </if>
  113. <if test="payEndTime !=null and payEndTime != ''">
  114. and t.pay_end_time= #{payEndTime}
  115. </if>
  116. <if test="curTime !=null and curTime != ''">
  117. and t.pay_start_time &lt; #{curTime}
  118. and t.pay_end_time &gt; #{curTime}
  119. </if>
  120. <if test="statusCd !=null and statusCd != ''">
  121. and t.status_cd= #{statusCd}
  122. </if>
  123. <if test="ruleId !=null and ruleId != ''">
  124. and t.rule_id= #{ruleId}
  125. </if>
  126. <if test="communityId !=null and communityId != ''">
  127. and t.community_id= #{communityId}
  128. </if>
  129. <if test="feeConfigId !=null and feeConfigId != ''">
  130. and t.fee_config_id= #{feeConfigId}
  131. </if>
  132. </select>
  133. </mapper>