FeeFormulaServiceDaoImplMapper.xml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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="feeFormulaServiceDaoImpl">
  6. <!-- 保存费用公式信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveFeeFormulaInfo" parameterType="Map">
  8. insert into fee_formula(
  9. formula_id,formula_type,formula_value,formula_desc,community_id,price
  10. ) values (
  11. #{formulaId},#{formulaType},#{formulaValue},#{formulaDesc},#{communityId},#{price}
  12. )
  13. </insert>
  14. <!-- 查询费用公式信息 add by wuxw 2018-07-03 -->
  15. <select id="getFeeFormulaInfo" parameterType="Map" resultType="Map">
  16. select t.formula_id,t.formula_id formulaId,t.formula_type,t.formula_type
  17. formulaType,t.formula_value,t.formula_value formulaValue,t.status_cd,t.status_cd
  18. statusCd,t.formula_desc,t.formula_desc formulaDesc,t.community_id,t.community_id communityId,
  19. t.price
  20. from fee_formula t
  21. where 1 =1
  22. <if test="formulaId !=null and formulaId != ''">
  23. and t.formula_id= #{formulaId}
  24. </if>
  25. <if test="formulaType !=null and formulaType != ''">
  26. and t.formula_type= #{formulaType}
  27. </if>
  28. <if test="formulaValue !=null and formulaValue != ''">
  29. and t.formula_value= #{formulaValue}
  30. </if>
  31. <if test="statusCd !=null and statusCd != ''">
  32. and t.status_cd= #{statusCd}
  33. </if>
  34. <if test="formulaDesc !=null and formulaDesc != ''">
  35. and t.formula_desc= #{formulaDesc}
  36. </if>
  37. <if test="communityId !=null and communityId != ''">
  38. and t.community_id= #{communityId}
  39. </if>
  40. order by t.create_time desc
  41. <if test="page != -1 and page != null ">
  42. limit #{page}, #{row}
  43. </if>
  44. </select>
  45. <!-- 修改费用公式信息 add by wuxw 2018-07-03 -->
  46. <update id="updateFeeFormulaInfo" parameterType="Map">
  47. update fee_formula t set t.status_cd = #{statusCd}
  48. <if test="newBId != null and newBId != ''">
  49. ,t.b_id = #{newBId}
  50. </if>
  51. <if test="formulaType !=null and formulaType != ''">
  52. , t.formula_type= #{formulaType}
  53. </if>
  54. <if test="formulaValue !=null and formulaValue != ''">
  55. , t.formula_value= #{formulaValue}
  56. </if>
  57. <if test="formulaDesc !=null and formulaDesc != ''">
  58. , t.formula_desc= #{formulaDesc}
  59. </if>
  60. <if test="communityId !=null and communityId != ''">
  61. , t.community_id= #{communityId}
  62. </if>
  63. <if test="price !=null and price != ''">
  64. , t.price= #{price}
  65. </if>
  66. where 1=1
  67. <if test="formulaId !=null and formulaId != ''">
  68. and t.formula_id= #{formulaId}
  69. </if>
  70. </update>
  71. <!-- 查询费用公式数量 add by wuxw 2018-07-03 -->
  72. <select id="queryFeeFormulasCount" parameterType="Map" resultType="Map">
  73. select count(1) count
  74. from fee_formula t
  75. where 1 =1
  76. <if test="formulaId !=null and formulaId != ''">
  77. and t.formula_id= #{formulaId}
  78. </if>
  79. <if test="formulaType !=null and formulaType != ''">
  80. and t.formula_type= #{formulaType}
  81. </if>
  82. <if test="formulaValue !=null and formulaValue != ''">
  83. and t.formula_value= #{formulaValue}
  84. </if>
  85. <if test="statusCd !=null and statusCd != ''">
  86. and t.status_cd= #{statusCd}
  87. </if>
  88. <if test="formulaDesc !=null and formulaDesc != ''">
  89. and t.formula_desc= #{formulaDesc}
  90. </if>
  91. <if test="communityId !=null and communityId != ''">
  92. and t.community_id= #{communityId}
  93. </if>
  94. </select>
  95. </mapper>