SHyglJfglMemberpointsinfoMapper.xml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="SHyglJfglMemberpointsinfoMapper" >
  4. <!-- 通用查询映射结果 -->
  5. <select id="selectSHyglJfglMemberpointsinfoList" parameterType="pd" resultType="pd">
  6. select * from s_hygl_jfgl_memberpointsinfo where 1=1
  7. <if test="memberCardNo !=null and memberCardNo !='' ">
  8. and memberCardNo = #{memberCardNo}
  9. </if>
  10. <if test="memberName !=null and memberName !='' ">
  11. and memberName = #{memberName}
  12. </if>
  13. <if test="phoneNumber !=null and phoneNumber !='' ">
  14. and phoneNumber = #{phoneNumber}
  15. </if>
  16. <if test="pickupStore !=null and pickupStore !='' ">
  17. and pickupStore = #{pickupStore}
  18. </if>
  19. <if test="remainingPoints !=null and remainingPoints !='' ">
  20. and remainingPoints = #{remainingPoints}
  21. </if>
  22. <if test="pointsAdjustment !=null and pointsAdjustment !='' ">
  23. and pointsAdjustment = #{pointsAdjustment}
  24. </if>
  25. <if test="pointsAdjustmentReason !=null and pointsAdjustmentReason !='' ">
  26. and pointsAdjustmentReason = #{pointsAdjustmentReason}
  27. </if>
  28. <if test="pointsChangeTime !=null and pointsChangeTime !='' ">
  29. and pointsChangeTime = #{pointsChangeTime}
  30. </if>
  31. <if test="pointbeginTime != null and pointbeginTime!='' and pointendTime != null and pointendTime!=''">
  32. and pointsChangeTime between #{pointbeginTime} and #{pointendTime}
  33. </if>
  34. <if test="query != null and query != ''">
  35. AND (memberCardNo LIKE CONCAT('%', #{query}, '%')
  36. OR phoneNumber = #{query})
  37. </if>
  38. <if test="id !=null and id !='' ">
  39. and id = #{id}
  40. </if>
  41. </select>
  42. <update id="updateSHyglJfglMemberpointsinfo" parameterType="pd" >
  43. update s_hygl_jfgl_memberpointsinfo
  44. <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
  45. <if test="memberCardNo !=null and memberCardNo !='' ">
  46. memberCardNo = #{memberCardNo},
  47. </if>
  48. <if test="memberName !=null and memberName !='' ">
  49. memberName = #{memberName},
  50. </if>
  51. <if test="phoneNumber !=null and phoneNumber !='' ">
  52. phoneNumber = #{phoneNumber},
  53. </if>
  54. <if test="pickupStore !=null and pickupStore !='' ">
  55. pickupStore = #{pickupStore},
  56. </if>
  57. <if test="remainingPoints !=null and remainingPoints !='' ">
  58. remainingPoints = #{remainingPoints},
  59. </if>
  60. <if test="pointsAdjustment !=null and pointsAdjustment !='' ">
  61. pointsAdjustment = #{pointsAdjustment},
  62. </if>
  63. <if test="pointsAdjustmentReason !=null and pointsAdjustmentReason !='' ">
  64. pointsAdjustmentReason = #{pointsAdjustmentReason},
  65. </if>
  66. <if test="pointsChangeTime !=null and pointsChangeTime !='' ">
  67. pointsChangeTime = #{pointsChangeTime},
  68. </if>
  69. </trim>
  70. <if test="up != null and up!=''">
  71. <if test="id != null and id!=''">
  72. where id=#{id}
  73. </if>
  74. </if>
  75. </update>
  76. <delete id="SHyglJfglMemberpointsinfoRemove" parameterType="pd">
  77. <if test="ids != null">
  78. delete from s_hygl_jfgl_memberpointsinfo where
  79. <if test="ids != null">
  80. id in(${ids})
  81. </if>
  82. </if>
  83. </delete>
  84. <insert id="addSHyglJfglMemberpointsinfo" parameterType="pd" >
  85. insert into s_hygl_jfgl_memberpointsinfo
  86. <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">
  87. <if test="memberCardNo !=null and memberCardNo !='' ">
  88. memberCardNo,
  89. </if>
  90. <if test="memberName !=null and memberName !='' ">
  91. memberName,
  92. </if>
  93. <if test="phoneNumber !=null and phoneNumber !='' ">
  94. phoneNumber,
  95. </if>
  96. <if test="pickupStore !=null and pickupStore !='' ">
  97. pickupStore,
  98. </if>
  99. <if test="remainingPoints !=null and remainingPoints !='' ">
  100. remainingPoints,
  101. </if>
  102. <if test="pointsAdjustment !=null and pointsAdjustment !='' ">
  103. pointsAdjustment,
  104. </if>
  105. <if test="pointsAdjustmentReason !=null and pointsAdjustmentReason !='' ">
  106. pointsAdjustmentReason,
  107. </if>
  108. <if test="pointsChangeTime !=null and pointsChangeTime !='' ">
  109. pointsChangeTime,
  110. </if>
  111. </trim>
  112. <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
  113. <if test="memberCardNo !=null and memberCardNo !='' ">
  114. #{memberCardNo},
  115. </if>
  116. <if test="memberName !=null and memberName !='' ">
  117. #{memberName},
  118. </if>
  119. <if test="phoneNumber !=null and phoneNumber !='' ">
  120. #{phoneNumber},
  121. </if>
  122. <if test="pickupStore !=null and pickupStore !='' ">
  123. #{pickupStore},
  124. </if>
  125. <if test="remainingPoints !=null and remainingPoints !='' ">
  126. #{remainingPoints},
  127. </if>
  128. <if test="pointsAdjustment !=null and pointsAdjustment !='' ">
  129. #{pointsAdjustment},
  130. </if>
  131. <if test="pointsAdjustmentReason !=null and pointsAdjustmentReason !='' ">
  132. #{pointsAdjustmentReason},
  133. </if>
  134. <if test="pointsChangeTime !=null and pointsChangeTime !='' ">
  135. #{pointsChangeTime},
  136. </if>
  137. </trim>
  138. </insert>
  139. </mapper>