FeeDiscountRuleServiceDaoImplMapper.xml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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="feeDiscountRuleServiceDaoImpl">
  6. <!-- 保存费用折扣规则信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveFeeDiscountRuleInfo" parameterType="Map">
  8. insert into fee_discount_rule(
  9. rule_name,remark,rule_id,bean_impl,#{discount_type}
  10. ) values (
  11. #{ruleName},#{remark},#{ruleId},#{beanImpl},#{discountType}
  12. )
  13. </insert>
  14. <!-- 查询费用折扣规则信息 add by wuxw 2018-07-03 -->
  15. <select id="getFeeDiscountRuleInfo" parameterType="Map" resultType="Map">
  16. select t.rule_name,t.rule_name ruleName,t.remark,t.status_cd,t.status_cd statusCd,t.rule_id,t.rule_id
  17. ruleId,t.bean_impl,t.bean_impl beanImpl,t.discount_type discountType,t.discount_small_type ,
  18. t.discount_small_type discountSmallType
  19. from fee_discount_rule t
  20. where 1 = 1
  21. <if test="ruleName !=null and ruleName != ''">
  22. and t.rule_name= #{ruleName}
  23. </if>
  24. <if test="remark !=null and remark != ''">
  25. and t.remark= #{remark}
  26. </if>
  27. <if test="statusCd !=null and statusCd != ''">
  28. and t.status_cd= #{statusCd}
  29. </if>
  30. <if test="ruleId !=null and ruleId != ''">
  31. and t.rule_id= #{ruleId}
  32. </if>
  33. <if test="beanImpl !=null and beanImpl != ''">
  34. and t.bean_impl= #{beanImpl}
  35. </if>
  36. <if test="discountType !=null and discountType != ''">
  37. and t.discount_type= #{discountType}
  38. </if>
  39. <if test="discountSmallType !=null and discountSmallType != ''">
  40. and t.discount_small_type= #{discountSmallType}
  41. </if>
  42. order by t.create_time desc
  43. <if test="page != -1 and page != null ">
  44. limit #{page}, #{row}
  45. </if>
  46. </select>
  47. <!-- 修改费用折扣规则信息 add by wuxw 2018-07-03 -->
  48. <update id="updateFeeDiscountRuleInfo" parameterType="Map">
  49. update fee_discount_rule t set t.status_cd = #{statusCd}
  50. <if test="newBId != null and newBId != ''">
  51. ,t.b_id = #{newBId}
  52. </if>
  53. <if test="ruleName !=null and ruleName != ''">
  54. , t.rule_name= #{ruleName}
  55. </if>
  56. <if test="remark !=null and remark != ''">
  57. , t.remark= #{remark}
  58. </if>
  59. <if test="beanImpl !=null and beanImpl != ''">
  60. , t.bean_impl= #{beanImpl}
  61. </if>
  62. where 1=1
  63. <if test="ruleId !=null and ruleId != ''">
  64. and t.rule_id= #{ruleId}
  65. </if>
  66. </update>
  67. <!-- 查询费用折扣规则数量 add by wuxw 2018-07-03 -->
  68. <select id="queryFeeDiscountRulesCount" parameterType="Map" resultType="Map">
  69. select count(1) count
  70. from fee_discount_rule t
  71. where 1 =1
  72. <if test="ruleName !=null and ruleName != ''">
  73. and t.rule_name= #{ruleName}
  74. </if>
  75. <if test="remark !=null and remark != ''">
  76. and t.remark= #{remark}
  77. </if>
  78. <if test="statusCd !=null and statusCd != ''">
  79. and t.status_cd= #{statusCd}
  80. </if>
  81. <if test="ruleId !=null and ruleId != ''">
  82. and t.rule_id= #{ruleId}
  83. </if>
  84. <if test="beanImpl !=null and beanImpl != ''">
  85. and t.bean_impl= #{beanImpl}
  86. </if>
  87. <if test="discountType !=null and discountType != ''">
  88. and t.discount_type= #{discountType}
  89. </if>
  90. </select>
  91. </mapper>