FeeComboMemberV1ServiceDaoImplMapper.xml 2.7 KB

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