IntegralGiftDetailV1ServiceDaoImplMapper.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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="integralGiftDetailV1ServiceDaoImpl">
  6. <!-- 保存积分赠送信息 add by wuxw 2018-07-03 -->
  7. <insert id="saveIntegralGiftDetailInfo" parameterType="Map">
  8. insert into integral_gift_detail(
  9. config_name,create_user_id,quantity,config_id,detail_id,rule_name,tel,community_id,rule_id,user_name
  10. ) values (
  11. #{configName},#{createUserId},#{quantity},#{configId},#{detailId},#{ruleName},#{tel},#{communityId},#{ruleId},#{userName}
  12. )
  13. </insert>
  14. <!-- 查询积分赠送信息 add by wuxw 2018-07-03 -->
  15. <select id="getIntegralGiftDetailInfo" parameterType="Map" resultType="Map">
  16. select t.config_name,t.config_name configName,t.create_user_id,t.create_user_id
  17. createUserId,t.quantity,t.config_id,t.config_id configId,t.detail_id,t.detail_id
  18. detailId,t.rule_name,t.rule_name ruleName,t.tel,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id
  19. communityId,t.rule_id,t.rule_id ruleId,t.user_name,t.user_name userName,t.create_time createTime
  20. from integral_gift_detail t
  21. where 1 =1
  22. <if test="configName !=null and configName != ''">
  23. and t.config_name= #{configName}
  24. </if>
  25. <if test="createUserId !=null and createUserId != ''">
  26. and t.create_user_id= #{createUserId}
  27. </if>
  28. <if test="quantity !=null and quantity != ''">
  29. and t.quantity= #{quantity}
  30. </if>
  31. <if test="configId !=null and configId != ''">
  32. and t.config_id= #{configId}
  33. </if>
  34. <if test="detailId !=null and detailId != ''">
  35. and t.detail_id= #{detailId}
  36. </if>
  37. <if test="ruleName !=null and ruleName != ''">
  38. and t.rule_name= #{ruleName}
  39. </if>
  40. <if test="tel !=null and tel != ''">
  41. and t.tel= #{tel}
  42. </if>
  43. <if test="statusCd !=null and statusCd != ''">
  44. and t.status_cd= #{statusCd}
  45. </if>
  46. <if test="communityId !=null and communityId != ''">
  47. and t.community_id= #{communityId}
  48. </if>
  49. <if test="ruleId !=null and ruleId != ''">
  50. and t.rule_id= #{ruleId}
  51. </if>
  52. <if test="userName !=null and userName != ''">
  53. and t.user_name= #{userName}
  54. </if>
  55. order by t.create_time desc
  56. <if test="page != -1 and page != null ">
  57. limit #{page}, #{row}
  58. </if>
  59. </select>
  60. <!-- 修改积分赠送信息 add by wuxw 2018-07-03 -->
  61. <update id="updateIntegralGiftDetailInfo" parameterType="Map">
  62. update integral_gift_detail t set t.status_cd = #{statusCd}
  63. <if test="newBId != null and newBId != ''">
  64. ,t.b_id = #{newBId}
  65. </if>
  66. <if test="configName !=null and configName != ''">
  67. , t.config_name= #{configName}
  68. </if>
  69. <if test="createUserId !=null and createUserId != ''">
  70. , t.create_user_id= #{createUserId}
  71. </if>
  72. <if test="quantity !=null and quantity != ''">
  73. , t.quantity= #{quantity}
  74. </if>
  75. <if test="configId !=null and configId != ''">
  76. , t.config_id= #{configId}
  77. </if>
  78. <if test="ruleName !=null and ruleName != ''">
  79. , t.rule_name= #{ruleName}
  80. </if>
  81. <if test="tel !=null and tel != ''">
  82. , t.tel= #{tel}
  83. </if>
  84. <if test="communityId !=null and communityId != ''">
  85. , t.community_id= #{communityId}
  86. </if>
  87. <if test="ruleId !=null and ruleId != ''">
  88. , t.rule_id= #{ruleId}
  89. </if>
  90. <if test="userName !=null and userName != ''">
  91. , t.user_name= #{userName}
  92. </if>
  93. where 1=1
  94. <if test="detailId !=null and detailId != ''">
  95. and t.detail_id= #{detailId}
  96. </if>
  97. </update>
  98. <!-- 查询积分赠送数量 add by wuxw 2018-07-03 -->
  99. <select id="queryIntegralGiftDetailsCount" parameterType="Map" resultType="Map">
  100. select count(1) count
  101. from integral_gift_detail t
  102. where 1 =1
  103. <if test="configName !=null and configName != ''">
  104. and t.config_name= #{configName}
  105. </if>
  106. <if test="createUserId !=null and createUserId != ''">
  107. and t.create_user_id= #{createUserId}
  108. </if>
  109. <if test="quantity !=null and quantity != ''">
  110. and t.quantity= #{quantity}
  111. </if>
  112. <if test="configId !=null and configId != ''">
  113. and t.config_id= #{configId}
  114. </if>
  115. <if test="detailId !=null and detailId != ''">
  116. and t.detail_id= #{detailId}
  117. </if>
  118. <if test="ruleName !=null and ruleName != ''">
  119. and t.rule_name= #{ruleName}
  120. </if>
  121. <if test="tel !=null and tel != ''">
  122. and t.tel= #{tel}
  123. </if>
  124. <if test="statusCd !=null and statusCd != ''">
  125. and t.status_cd= #{statusCd}
  126. </if>
  127. <if test="communityId !=null and communityId != ''">
  128. and t.community_id= #{communityId}
  129. </if>
  130. <if test="ruleId !=null and ruleId != ''">
  131. and t.rule_id= #{ruleId}
  132. </if>
  133. <if test="userName !=null and userName != ''">
  134. and t.user_name= #{userName}
  135. </if>
  136. </select>
  137. </mapper>