123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
- <mapper namespace="SHyglJfglMemberpointsinfoMapper" >
- <!-- 通用查询映射结果 -->
- <select id="selectSHyglJfglMemberpointsinfoList" parameterType="pd" resultType="pd">
- select * from s_hygl_jfgl_memberpointsinfo where 1=1
- <if test="memberCardNo !=null and memberCardNo !='' ">
- and memberCardNo = #{memberCardNo}
- </if>
- <if test="memberName !=null and memberName !='' ">
- and memberName = #{memberName}
- </if>
- <if test="phoneNumber !=null and phoneNumber !='' ">
- and phoneNumber = #{phoneNumber}
- </if>
- <if test="pickupStore !=null and pickupStore !='' ">
- and pickupStore = #{pickupStore}
- </if>
- <if test="remainingPoints !=null and remainingPoints !='' ">
- and remainingPoints = #{remainingPoints}
- </if>
- <if test="pointsAdjustment !=null and pointsAdjustment !='' ">
- and pointsAdjustment = #{pointsAdjustment}
- </if>
- <if test="pointsAdjustmentReason !=null and pointsAdjustmentReason !='' ">
- and pointsAdjustmentReason = #{pointsAdjustmentReason}
- </if>
- <if test="pointsChangeTime !=null and pointsChangeTime !='' ">
- and pointsChangeTime = #{pointsChangeTime}
- </if>
- <if test="pointbeginTime != null and pointbeginTime!='' and pointendTime != null and pointendTime!=''">
- and pointsChangeTime between #{pointbeginTime} and #{pointendTime}
- </if>
- <if test="query != null and query != ''">
- AND (memberCardNo LIKE CONCAT('%', #{query}, '%')
- OR phoneNumber = #{query})
- </if>
- <if test="id !=null and id !='' ">
- and id = #{id}
- </if>
- </select>
- <update id="updateSHyglJfglMemberpointsinfo" parameterType="pd" >
- update s_hygl_jfgl_memberpointsinfo
- <trim prefix=" SET " suffix="" prefixOverrides="," suffixOverrides=",">
- <if test="memberCardNo !=null and memberCardNo !='' ">
- memberCardNo = #{memberCardNo},
- </if>
- <if test="memberName !=null and memberName !='' ">
- memberName = #{memberName},
- </if>
- <if test="phoneNumber !=null and phoneNumber !='' ">
- phoneNumber = #{phoneNumber},
- </if>
- <if test="pickupStore !=null and pickupStore !='' ">
- pickupStore = #{pickupStore},
- </if>
- <if test="remainingPoints !=null and remainingPoints !='' ">
- remainingPoints = #{remainingPoints},
- </if>
- <if test="pointsAdjustment !=null and pointsAdjustment !='' ">
- pointsAdjustment = #{pointsAdjustment},
- </if>
- <if test="pointsAdjustmentReason !=null and pointsAdjustmentReason !='' ">
- pointsAdjustmentReason = #{pointsAdjustmentReason},
- </if>
- <if test="pointsChangeTime !=null and pointsChangeTime !='' ">
- pointsChangeTime = #{pointsChangeTime},
- </if>
- </trim>
- <if test="up != null and up!=''">
- <if test="id != null and id!=''">
- where id=#{id}
- </if>
- </if>
- </update>
- <delete id="SHyglJfglMemberpointsinfoRemove" parameterType="pd">
- <if test="ids != null">
- delete from s_hygl_jfgl_memberpointsinfo where
- <if test="ids != null">
- id in(${ids})
- </if>
- </if>
- </delete>
- <insert id="addSHyglJfglMemberpointsinfo" parameterType="pd" >
- insert into s_hygl_jfgl_memberpointsinfo
- <trim prefix="(" suffix=")" prefixOverrides="," suffixOverrides=",">
- <if test="memberCardNo !=null and memberCardNo !='' ">
- memberCardNo,
- </if>
- <if test="memberName !=null and memberName !='' ">
- memberName,
- </if>
- <if test="phoneNumber !=null and phoneNumber !='' ">
- phoneNumber,
- </if>
- <if test="pickupStore !=null and pickupStore !='' ">
- pickupStore,
- </if>
- <if test="remainingPoints !=null and remainingPoints !='' ">
- remainingPoints,
- </if>
- <if test="pointsAdjustment !=null and pointsAdjustment !='' ">
- pointsAdjustment,
- </if>
- <if test="pointsAdjustmentReason !=null and pointsAdjustmentReason !='' ">
- pointsAdjustmentReason,
- </if>
- <if test="pointsChangeTime !=null and pointsChangeTime !='' ">
- pointsChangeTime,
- </if>
- </trim>
- <trim prefix=" VALUES (" suffix=")" prefixOverrides="," suffixOverrides=",">
- <if test="memberCardNo !=null and memberCardNo !='' ">
- #{memberCardNo},
- </if>
- <if test="memberName !=null and memberName !='' ">
- #{memberName},
- </if>
- <if test="phoneNumber !=null and phoneNumber !='' ">
- #{phoneNumber},
- </if>
- <if test="pickupStore !=null and pickupStore !='' ">
- #{pickupStore},
- </if>
- <if test="remainingPoints !=null and remainingPoints !='' ">
- #{remainingPoints},
- </if>
- <if test="pointsAdjustment !=null and pointsAdjustment !='' ">
- #{pointsAdjustment},
- </if>
- <if test="pointsAdjustmentReason !=null and pointsAdjustmentReason !='' ">
- #{pointsAdjustmentReason},
- </if>
- <if test="pointsChangeTime !=null and pointsChangeTime !='' ">
- #{pointsChangeTime},
- </if>
- </trim>
- </insert>
- </mapper>
|