FeeComboV1ServiceDaoImplMapper.xml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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="feeComboV1ServiceDaoImpl">
  6. <!-- 保存费用套餐信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveFeeComboInfo" parameterType="Map">
  8. insert into fee_combo(
  9. combo_name,combo_id,community_id,remark
  10. ) values (
  11. #{comboName},#{comboId},#{communityId},#{remark}
  12. )
  13. </insert>
  14. <!-- 查询费用套餐信息 add by wuxw 2018-07-03 -->
  15. <select id="getFeeComboInfo" parameterType="Map" resultType="Map">
  16. select t.combo_name,t.combo_name comboName,t.combo_id,t.combo_id comboId,t.status_cd,t.status_cd
  17. statusCd,t.community_id,t.community_id communityId,t.remark,t.create_time createTime
  18. from fee_combo t
  19. where 1 =1
  20. <if test="comboName !=null and comboName != ''">
  21. and t.combo_name= #{comboName}
  22. </if>
  23. <if test="comboId !=null and comboId != ''">
  24. and t.combo_id= #{comboId}
  25. </if>
  26. <if test="statusCd !=null and statusCd != ''">
  27. and t.status_cd= #{statusCd}
  28. </if>
  29. <if test="communityId !=null and communityId != ''">
  30. and t.community_id= #{communityId}
  31. </if>
  32. order by t.create_time desc
  33. <if test="page != -1 and page != null ">
  34. limit #{page}, #{row}
  35. </if>
  36. </select>
  37. <!-- 修改费用套餐信息 add by wuxw 2018-07-03 -->
  38. <update id="updateFeeComboInfo" parameterType="Map">
  39. update fee_combo t set t.status_cd = #{statusCd}
  40. <if test="newBId != null and newBId != ''">
  41. ,t.b_id = #{newBId}
  42. </if>
  43. <if test="comboName !=null and comboName != ''">
  44. , t.combo_name= #{comboName}
  45. </if>
  46. <if test="remark !=null and remark != ''">
  47. , t.remark= #{remark}
  48. </if>
  49. where 1=1
  50. <if test="comboId !=null and comboId != ''">
  51. and t.combo_id= #{comboId}
  52. </if>
  53. <if test="communityId !=null and communityId != ''">
  54. and t.community_id= #{communityId}
  55. </if>
  56. </update>
  57. <!-- 查询费用套餐数量 add by wuxw 2018-07-03 -->
  58. <select id="queryFeeCombosCount" parameterType="Map" resultType="Map">
  59. select count(1) count
  60. from fee_combo t
  61. where 1 =1
  62. <if test="comboName !=null and comboName != ''">
  63. and t.combo_name= #{comboName}
  64. </if>
  65. <if test="comboId !=null and comboId != ''">
  66. and t.combo_id= #{comboId}
  67. </if>
  68. <if test="statusCd !=null and statusCd != ''">
  69. and t.status_cd= #{statusCd}
  70. </if>
  71. <if test="communityId !=null and communityId != ''">
  72. and t.community_id= #{communityId}
  73. </if>
  74. </select>
  75. </mapper>