|
@@ -0,0 +1,627 @@
|
|
|
|
|
+<?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="com.pine.admin.modules.business.dao.CustomerDao">
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 可根据自己的需求,是否要使用 -->
|
|
|
|
|
+ <resultMap type="com.pine.admin.modules.business.entity.Customer" id="entityMap">
|
|
|
|
|
+ <result property="id" column="id"/>
|
|
|
|
|
+ <result property="username" column="username"/>
|
|
|
|
|
+ <result property="password" column="password"/>
|
|
|
|
|
+ <result property="nickname" column="nickname"/>
|
|
|
|
|
+ <result property="image" column="image"/>
|
|
|
|
|
+ <result property="relename" column="relename"/>
|
|
|
|
|
+ <result property="cardid" column="cardid"/>
|
|
|
|
|
+ <result property="gender" column="gender"/>
|
|
|
|
|
+ <result property="birthday" column="birthday"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="Base_Column_List">
|
|
|
|
|
+ id,
|
|
|
|
|
+ username,
|
|
|
|
|
+-- password,
|
|
|
|
|
+-- nickname,
|
|
|
|
|
+-- image,
|
|
|
|
|
+-- relename,
|
|
|
|
|
+-- cardid,
|
|
|
|
|
+-- gender,
|
|
|
|
|
+-- birthday,
|
|
|
|
|
+-- monthly_income,
|
|
|
|
|
+-- marriage_status,
|
|
|
|
|
+ mobile,
|
|
|
|
|
+-- email,
|
|
|
|
|
+-- modified_email,
|
|
|
|
|
+-- check_code,
|
|
|
|
|
+-- province,
|
|
|
|
|
+-- city,
|
|
|
|
|
+-- county,
|
|
|
|
|
+-- detailaddress,
|
|
|
|
|
+-- interest,
|
|
|
|
|
+-- store_id,
|
|
|
|
|
+-- type,
|
|
|
|
|
+-- consumption_amount,
|
|
|
|
|
+-- paypassword,
|
|
|
|
|
+-- source,
|
|
|
|
|
+-- status,
|
|
|
|
|
+-- sign_num,
|
|
|
|
|
+-- is_mobile_verification,
|
|
|
|
|
+-- is_email_verification,
|
|
|
|
|
+-- login_error_count,
|
|
|
|
|
+-- del_flag,
|
|
|
|
|
+-- create_time,
|
|
|
|
|
+-- modify_time,
|
|
|
|
|
+-- del_time,
|
|
|
|
|
+-- lock_time,
|
|
|
|
|
+-- last_login_time,
|
|
|
|
|
+-- recommended,
|
|
|
|
|
+-- self_recommend_code,
|
|
|
|
|
+-- commission,
|
|
|
|
|
+-- belone_store_id
|
|
|
|
|
+ </sql>
|
|
|
|
|
+ <!-- 根据Id查询-->
|
|
|
|
|
+ <select id="selectByPrimaryKey" resultMap="entityMap" parameterType="java.lang.Integer">
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ from ls_customer
|
|
|
|
|
+ where id = #{id,jdbcType=INTEGER} and del_flag = '0'
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 根据Id删除-->
|
|
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
|
|
+ delete from ls_customer
|
|
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
+ </delete>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 插入数据-->
|
|
|
|
|
+ <insert id="insertSelective" parameterType="com.pine.admin.modules.business.entity.Customer"
|
|
|
|
|
+ useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|
+ insert into ls_customer
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="id != null">id,</if>
|
|
|
|
|
+ <if test="username != null">username,</if>
|
|
|
|
|
+ <if test="password != null">password,</if>
|
|
|
|
|
+ <if test="nickname != null">nickname,</if>
|
|
|
|
|
+ <if test="image != null">image,</if>
|
|
|
|
|
+ <if test="relename != null">relename,</if>
|
|
|
|
|
+ <if test="cardid != null">cardid,</if>
|
|
|
|
|
+ <if test="gender != null">gender,</if>
|
|
|
|
|
+ <if test="birthday != null">birthday,</if>
|
|
|
|
|
+ <if test="monthlyIncome != null">monthly_income,</if>
|
|
|
|
|
+ <if test="marriageStatus != null">marriage_status,</if>
|
|
|
|
|
+ <if test="mobile != null">mobile,</if>
|
|
|
|
|
+ <if test="email != null">email,</if>
|
|
|
|
|
+ <if test="modifiedEmail != null">modified_email,</if>
|
|
|
|
|
+ <if test="checkCode != null">check_code,</if>
|
|
|
|
|
+ <if test="province != null">province,</if>
|
|
|
|
|
+ <if test="city != null">city,</if>
|
|
|
|
|
+ <if test="county != null">county,</if>
|
|
|
|
|
+ <if test="detailaddress != null">detailaddress,</if>
|
|
|
|
|
+ <if test="interest != null">interest,</if>
|
|
|
|
|
+ <if test="storeId != null">store_id,</if>
|
|
|
|
|
+ <if test="type != null">type,</if>
|
|
|
|
|
+ <if test="consumptionAmount != null">consumption_amount,</if>
|
|
|
|
|
+ <if test="paypassword != null">paypassword,</if>
|
|
|
|
|
+ <if test="source != null">source,</if>
|
|
|
|
|
+ <if test="status != null">status,</if>
|
|
|
|
|
+ <if test="signNum != null">sign_num,</if>
|
|
|
|
|
+ <if test="isMobileVerification != null">is_mobile_verification,</if>
|
|
|
|
|
+ <if test="isEmailVerification != null">is_email_verification,</if>
|
|
|
|
|
+ <if test="loginErrorCount != null">login_error_count,</if>
|
|
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
|
|
+ <if test="modifyTime != null">modify_time,</if>
|
|
|
|
|
+ <if test="delTime != null">del_time,</if>
|
|
|
|
|
+ <if test="lockTime != null">lock_time,</if>
|
|
|
|
|
+ <if test="lastLoginTime != null">last_login_time,</if>
|
|
|
|
|
+ <if test="recommended != null">recommended,</if>
|
|
|
|
|
+ <if test="selfRecommendCode != null">self_recommend_code,</if>
|
|
|
|
|
+ <if test="commission != null">commission,</if>
|
|
|
|
|
+ <if test="beloneStoreId != null">belone_store_id,</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
|
|
+ <if test="username != null">#{username},</if>
|
|
|
|
|
+ <if test="password != null">#{password},</if>
|
|
|
|
|
+ <if test="nickname != null">#{nickname},</if>
|
|
|
|
|
+ <if test="image != null">#{image},</if>
|
|
|
|
|
+ <if test="relename != null">#{relename},</if>
|
|
|
|
|
+ <if test="cardid != null">#{cardid},</if>
|
|
|
|
|
+ <if test="gender != null">#{gender},</if>
|
|
|
|
|
+ <if test="birthday != null">#{birthday},</if>
|
|
|
|
|
+ <if test="monthlyIncome != null">#{monthlyIncome},</if>
|
|
|
|
|
+ <if test="marriageStatus != null">#{marriageStatus},</if>
|
|
|
|
|
+ <if test="mobile != null">#{mobile},</if>
|
|
|
|
|
+ <if test="email != null">#{email},</if>
|
|
|
|
|
+ <if test="modifiedEmail != null">#{modifiedEmail},</if>
|
|
|
|
|
+ <if test="checkCode != null">#{checkCode},</if>
|
|
|
|
|
+ <if test="province != null">#{province},</if>
|
|
|
|
|
+ <if test="city != null">#{city},</if>
|
|
|
|
|
+ <if test="county != null">#{county},</if>
|
|
|
|
|
+ <if test="detailaddress != null">#{detailaddress},</if>
|
|
|
|
|
+ <if test="interest != null">#{interest},</if>
|
|
|
|
|
+ <if test="storeId != null">#{storeId},</if>
|
|
|
|
|
+ <if test="type != null">#{type},</if>
|
|
|
|
|
+ <if test="consumptionAmount != null">#{consumptionAmount},</if>
|
|
|
|
|
+ <if test="paypassword != null">#{paypassword},</if>
|
|
|
|
|
+ <if test="source != null">#{source},</if>
|
|
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
|
|
+ <if test="signNum != null">#{signNum},</if>
|
|
|
|
|
+ <if test="isMobileVerification != null">#{isMobileVerification},</if>
|
|
|
|
|
+ <if test="isEmailVerification != null">#{isEmailVerification},</if>
|
|
|
|
|
+ <if test="loginErrorCount != null">#{loginErrorCount},</if>
|
|
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
|
|
+ <if test="modifyTime != null">#{modifyTime},</if>
|
|
|
|
|
+ <if test="delTime != null">#{delTime},</if>
|
|
|
|
|
+ <if test="lockTime != null">#{lockTime},</if>
|
|
|
|
|
+ <if test="lastLoginTime != null">#{lastLoginTime},</if>
|
|
|
|
|
+ <if test="recommended != null">#{recommended},</if>
|
|
|
|
|
+ <if test="selfRecommendCode != null">#{selfRecommendCode},</if>
|
|
|
|
|
+ <if test="commission != null">#{commission},</if>
|
|
|
|
|
+ <if test="beloneStoreId != null">#{beloneStoreId},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 更新数据-->
|
|
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.pine.admin.modules.business.entity.Customer">
|
|
|
|
|
+ update ls_customer
|
|
|
|
|
+ <set>
|
|
|
|
|
+ <if test="id != null">id = #{id},</if>
|
|
|
|
|
+ <if test="username != null">username = #{username},</if>
|
|
|
|
|
+ <if test="password != null">password = #{password},</if>
|
|
|
|
|
+ <if test="nickname != null">nickname = #{nickname},</if>
|
|
|
|
|
+ <if test="image != null">image = #{image},</if>
|
|
|
|
|
+ <if test="relename != null">relename = #{relename},</if>
|
|
|
|
|
+ <if test="cardid != null">cardid = #{cardid},</if>
|
|
|
|
|
+ <if test="gender != null">gender = #{gender},</if>
|
|
|
|
|
+ <if test="birthday != null">birthday = #{birthday},</if>
|
|
|
|
|
+ <if test="monthlyIncome != null">monthly_income = #{monthlyIncome},</if>
|
|
|
|
|
+ <if test="marriageStatus != null">marriage_status = #{marriageStatus},</if>
|
|
|
|
|
+ <if test="mobile != null">mobile = #{mobile},</if>
|
|
|
|
|
+ <if test="email != null">email = #{email},</if>
|
|
|
|
|
+ <if test="modifiedEmail != null">modified_email = #{modifiedEmail},</if>
|
|
|
|
|
+ <if test="checkCode != null">check_code = #{checkCode},</if>
|
|
|
|
|
+ <if test="province != null">province = #{province},</if>
|
|
|
|
|
+ <if test="city != null">city = #{city},</if>
|
|
|
|
|
+ <if test="county != null">county = #{county},</if>
|
|
|
|
|
+ <if test="detailaddress != null">detailaddress = #{detailaddress},</if>
|
|
|
|
|
+ <if test="interest != null">interest = #{interest},</if>
|
|
|
|
|
+ <if test="storeId != null">store_id = #{storeId},</if>
|
|
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
|
|
+ <if test="consumptionAmount != null">consumption_amount = #{consumptionAmount},</if>
|
|
|
|
|
+ <if test="paypassword != null">paypassword = #{paypassword},</if>
|
|
|
|
|
+ <if test="source != null">source = #{source},</if>
|
|
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
|
|
+ <if test="signNum != null">sign_num = #{signNum},</if>
|
|
|
|
|
+ <if test="isMobileVerification != null">is_mobile_verification = #{isMobileVerification},</if>
|
|
|
|
|
+ <if test="isEmailVerification != null">is_email_verification = #{isEmailVerification},</if>
|
|
|
|
|
+ <if test="loginErrorCount != null">login_error_count = #{loginErrorCount},</if>
|
|
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
+ <if test="modifyTime != null">modify_time = #{modifyTime},</if>
|
|
|
|
|
+ <if test="delTime != null">del_time = #{delTime},</if>
|
|
|
|
|
+ <if test="lockTime != null">lock_time = #{lockTime},</if>
|
|
|
|
|
+ <if test="lastLoginTime != null">last_login_time = #{lastLoginTime},</if>
|
|
|
|
|
+ <if test="recommended != null">recommended = #{recommended},</if>
|
|
|
|
|
+ <if test="selfRecommendCode != null">self_recommend_code = #{selfRecommendCode},</if>
|
|
|
|
|
+ <if test="commission != null">commission = #{commission},</if>
|
|
|
|
|
+ <if test="beloneStoreId != null">belone_store_id = #{beloneStoreId},</if>
|
|
|
|
|
+ </set>
|
|
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 分页查询-->
|
|
|
|
|
+ <select id="queryByPage" parameterType="java.util.Map"
|
|
|
|
|
+ resultMap="entityMap">
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ from ls_customer
|
|
|
|
|
+ <where>
|
|
|
|
|
+ and del_flag = 'N'
|
|
|
|
|
+ <if test="record.id != null and !"".equals(record.id)">
|
|
|
|
|
+ and id = #{record.id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.username != null and !"".equals(record.username)">
|
|
|
|
|
+ and username = #{record.username}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.password != null and !"".equals(record.password)">
|
|
|
|
|
+ and password = #{record.password}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.nickname != null and !"".equals(record.nickname)">
|
|
|
|
|
+ and nickname = #{record.nickname}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.image != null and !"".equals(record.image)">
|
|
|
|
|
+ and image = #{record.image}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.relename != null and !"".equals(record.relename)">
|
|
|
|
|
+ and relename = #{record.relename}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.cardid != null and !"".equals(record.cardid)">
|
|
|
|
|
+ and cardid = #{record.cardid}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.gender != null and !"".equals(record.gender)">
|
|
|
|
|
+ and gender = #{record.gender}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.birthday != null and !"".equals(record.birthday)">
|
|
|
|
|
+ and birthday = #{record.birthday}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.monthlyIncome != null and !"".equals(record.monthlyIncome)">
|
|
|
|
|
+ and monthly_income = #{record.monthlyIncome}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.marriageStatus != null and !"".equals(record.marriageStatus)">
|
|
|
|
|
+ and marriage_status = #{record.marriageStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.mobile != null and !"".equals(record.mobile)">
|
|
|
|
|
+ and mobile = #{record.mobile}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.email != null and !"".equals(record.email)">
|
|
|
|
|
+ and email = #{record.email}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.modifiedEmail != null and !"".equals(record.modifiedEmail)">
|
|
|
|
|
+ and modified_email = #{record.modifiedEmail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.checkCode != null and !"".equals(record.checkCode)">
|
|
|
|
|
+ and check_code = #{record.checkCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.province != null and !"".equals(record.province)">
|
|
|
|
|
+ and province = #{record.province}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.city != null and !"".equals(record.city)">
|
|
|
|
|
+ and city = #{record.city}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.county != null and !"".equals(record.county)">
|
|
|
|
|
+ and county = #{record.county}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.detailaddress != null and !"".equals(record.detailaddress)">
|
|
|
|
|
+ and detailaddress = #{record.detailaddress}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.interest != null and !"".equals(record.interest)">
|
|
|
|
|
+ and interest = #{record.interest}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.storeId != null and !"".equals(record.storeId)">
|
|
|
|
|
+ and store_id = #{record.storeId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.type != null and !"".equals(record.type)">
|
|
|
|
|
+ and type = #{record.type}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.consumptionAmount != null and !"".equals(record.consumptionAmount)">
|
|
|
|
|
+ and consumption_amount = #{record.consumptionAmount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.paypassword != null and !"".equals(record.paypassword)">
|
|
|
|
|
+ and paypassword = #{record.paypassword}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.source != null and !"".equals(record.source)">
|
|
|
|
|
+ and source = #{record.source}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.status != null and !"".equals(record.status)">
|
|
|
|
|
+ and status = #{record.status}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.signNum != null and !"".equals(record.signNum)">
|
|
|
|
|
+ and sign_num = #{record.signNum}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.isMobileVerification != null and !"".equals(record.isMobileVerification)">
|
|
|
|
|
+ and is_mobile_verification = #{record.isMobileVerification}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.isEmailVerification != null and !"".equals(record.isEmailVerification)">
|
|
|
|
|
+ and is_email_verification = #{record.isEmailVerification}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.loginErrorCount != null and !"".equals(record.loginErrorCount)">
|
|
|
|
|
+ and login_error_count = #{record.loginErrorCount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.delFlag != null and !"".equals(record.delFlag)">
|
|
|
|
|
+ and del_flag = #{record.delFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.createTime != null and !"".equals(record.createTime)">
|
|
|
|
|
+ and create_time = #{record.createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.modifyTime != null and !"".equals(record.modifyTime)">
|
|
|
|
|
+ and modify_time = #{record.modifyTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.delTime != null and !"".equals(record.delTime)">
|
|
|
|
|
+ and del_time = #{record.delTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.lockTime != null and !"".equals(record.lockTime)">
|
|
|
|
|
+ and lock_time = #{record.lockTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.lastLoginTime != null and !"".equals(record.lastLoginTime)">
|
|
|
|
|
+ and last_login_time = #{record.lastLoginTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.recommended != null and !"".equals(record.recommended)">
|
|
|
|
|
+ and recommended = #{record.recommended}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.selfRecommendCode != null and !"".equals(record.selfRecommendCode)">
|
|
|
|
|
+ and self_recommend_code = #{record.selfRecommendCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.commission != null and !"".equals(record.commission)">
|
|
|
|
|
+ and commission = #{record.commission}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="record.beloneStoreId != null and !"".equals(record.beloneStoreId)">
|
|
|
|
|
+ and belone_store_id = #{record.beloneStoreId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by id desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 全部查询 -->
|
|
|
|
|
+ <select id="queryAll" parameterType="java.util.Map"
|
|
|
|
|
+ resultMap="entityMap">
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ from ls_customer
|
|
|
|
|
+ <where>
|
|
|
|
|
+ and del_flag = 'N'
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
|
|
+ and id = #{id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="username != null and !"".equals(username)">
|
|
|
|
|
+ and username = #{username}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="password != null and !"".equals(password)">
|
|
|
|
|
+ and password = #{password}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="nickname != null and !"".equals(nickname)">
|
|
|
|
|
+ and nickname = #{nickname}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="image != null and !"".equals(image)">
|
|
|
|
|
+ and image = #{image}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="relename != null and !"".equals(relename)">
|
|
|
|
|
+ and relename = #{relename}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cardid != null and !"".equals(cardid)">
|
|
|
|
|
+ and cardid = #{cardid}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="gender != null and !"".equals(gender)">
|
|
|
|
|
+ and gender = #{gender}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="birthday != null and !"".equals(birthday)">
|
|
|
|
|
+ and birthday = #{birthday}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="monthlyIncome != null and !"".equals(monthlyIncome)">
|
|
|
|
|
+ and monthly_income = #{monthlyIncome}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="marriageStatus != null and !"".equals(marriageStatus)">
|
|
|
|
|
+ and marriage_status = #{marriageStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="mobile != null and !"".equals(mobile)">
|
|
|
|
|
+ and mobile = #{mobile}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="email != null and !"".equals(email)">
|
|
|
|
|
+ and email = #{email}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="modifiedEmail != null and !"".equals(modifiedEmail)">
|
|
|
|
|
+ and modified_email = #{modifiedEmail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="checkCode != null and !"".equals(checkCode)">
|
|
|
|
|
+ and check_code = #{checkCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="province != null and !"".equals(province)">
|
|
|
|
|
+ and province = #{province}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="city != null and !"".equals(city)">
|
|
|
|
|
+ and city = #{city}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="county != null and !"".equals(county)">
|
|
|
|
|
+ and county = #{county}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="detailaddress != null and !"".equals(detailaddress)">
|
|
|
|
|
+ and detailaddress = #{detailaddress}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="interest != null and !"".equals(interest)">
|
|
|
|
|
+ and interest = #{interest}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="storeId != null and !"".equals(storeId)">
|
|
|
|
|
+ and store_id = #{storeId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="type != null and !"".equals(type)">
|
|
|
|
|
+ and type = #{type}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="consumptionAmount != null and !"".equals(consumptionAmount)">
|
|
|
|
|
+ and consumption_amount = #{consumptionAmount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="paypassword != null and !"".equals(paypassword)">
|
|
|
|
|
+ and paypassword = #{paypassword}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="source != null and !"".equals(source)">
|
|
|
|
|
+ and source = #{source}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="status != null and !"".equals(status)">
|
|
|
|
|
+ and status = #{status}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="signNum != null and !"".equals(signNum)">
|
|
|
|
|
+ and sign_num = #{signNum}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="isMobileVerification != null and !"".equals(isMobileVerification)">
|
|
|
|
|
+ and is_mobile_verification = #{isMobileVerification}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="isEmailVerification != null and !"".equals(isEmailVerification)">
|
|
|
|
|
+ and is_email_verification = #{isEmailVerification}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="loginErrorCount != null and !"".equals(loginErrorCount)">
|
|
|
|
|
+ and login_error_count = #{loginErrorCount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
|
|
+ and del_flag = #{delFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null and !"".equals(createTime)">
|
|
|
|
|
+ and create_time = #{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="modifyTime != null and !"".equals(modifyTime)">
|
|
|
|
|
+ and modify_time = #{modifyTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="delTime != null and !"".equals(delTime)">
|
|
|
|
|
+ and del_time = #{delTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lockTime != null and !"".equals(lockTime)">
|
|
|
|
|
+ and lock_time = #{lockTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lastLoginTime != null and !"".equals(lastLoginTime)">
|
|
|
|
|
+ and last_login_time = #{lastLoginTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="recommended != null and !"".equals(recommended)">
|
|
|
|
|
+ and recommended = #{recommended}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="selfRecommendCode != null and !"".equals(selfRecommendCode)">
|
|
|
|
|
+ and self_recommend_code = #{selfRecommendCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="commission != null and !"".equals(commission)">
|
|
|
|
|
+ and commission = #{commission}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="beloneStoreId != null and !"".equals(beloneStoreId)">
|
|
|
|
|
+ and belone_store_id = #{beloneStoreId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by id desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 根据条件查询一个 -->
|
|
|
|
|
+ <select id="queryOne" parameterType="java.util.Map"
|
|
|
|
|
+ resultMap="entityMap">
|
|
|
|
|
+ select
|
|
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
|
|
+ from ls_customer
|
|
|
|
|
+ <where>
|
|
|
|
|
+ and del_flag = 'N'
|
|
|
|
|
+ <if test="id != null and !"".equals(id)">
|
|
|
|
|
+ and id = #{id}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="username != null and !"".equals(username)">
|
|
|
|
|
+ and username = #{username}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="password != null and !"".equals(password)">
|
|
|
|
|
+ and password = #{password}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="nickname != null and !"".equals(nickname)">
|
|
|
|
|
+ and nickname = #{nickname}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="image != null and !"".equals(image)">
|
|
|
|
|
+ and image = #{image}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="relename != null and !"".equals(relename)">
|
|
|
|
|
+ and relename = #{relename}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="cardid != null and !"".equals(cardid)">
|
|
|
|
|
+ and cardid = #{cardid}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="gender != null and !"".equals(gender)">
|
|
|
|
|
+ and gender = #{gender}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="birthday != null and !"".equals(birthday)">
|
|
|
|
|
+ and birthday = #{birthday}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="monthlyIncome != null and !"".equals(monthlyIncome)">
|
|
|
|
|
+ and monthly_income = #{monthlyIncome}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="marriageStatus != null and !"".equals(marriageStatus)">
|
|
|
|
|
+ and marriage_status = #{marriageStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="mobile != null and !"".equals(mobile)">
|
|
|
|
|
+ and mobile = #{mobile}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="email != null and !"".equals(email)">
|
|
|
|
|
+ and email = #{email}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="modifiedEmail != null and !"".equals(modifiedEmail)">
|
|
|
|
|
+ and modified_email = #{modifiedEmail}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="checkCode != null and !"".equals(checkCode)">
|
|
|
|
|
+ and check_code = #{checkCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="province != null and !"".equals(province)">
|
|
|
|
|
+ and province = #{province}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="city != null and !"".equals(city)">
|
|
|
|
|
+ and city = #{city}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="county != null and !"".equals(county)">
|
|
|
|
|
+ and county = #{county}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="detailaddress != null and !"".equals(detailaddress)">
|
|
|
|
|
+ and detailaddress = #{detailaddress}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="interest != null and !"".equals(interest)">
|
|
|
|
|
+ and interest = #{interest}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="storeId != null and !"".equals(storeId)">
|
|
|
|
|
+ and store_id = #{storeId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="type != null and !"".equals(type)">
|
|
|
|
|
+ and type = #{type}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="consumptionAmount != null and !"".equals(consumptionAmount)">
|
|
|
|
|
+ and consumption_amount = #{consumptionAmount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="paypassword != null and !"".equals(paypassword)">
|
|
|
|
|
+ and paypassword = #{paypassword}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="source != null and !"".equals(source)">
|
|
|
|
|
+ and source = #{source}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="status != null and !"".equals(status)">
|
|
|
|
|
+ and status = #{status}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="signNum != null and !"".equals(signNum)">
|
|
|
|
|
+ and sign_num = #{signNum}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="isMobileVerification != null and !"".equals(isMobileVerification)">
|
|
|
|
|
+ and is_mobile_verification = #{isMobileVerification}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="isEmailVerification != null and !"".equals(isEmailVerification)">
|
|
|
|
|
+ and is_email_verification = #{isEmailVerification}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="loginErrorCount != null and !"".equals(loginErrorCount)">
|
|
|
|
|
+ and login_error_count = #{loginErrorCount}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="delFlag != null and !"".equals(delFlag)">
|
|
|
|
|
+ and del_flag = #{delFlag}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="createTime != null and !"".equals(createTime)">
|
|
|
|
|
+ and create_time = #{createTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="modifyTime != null and !"".equals(modifyTime)">
|
|
|
|
|
+ and modify_time = #{modifyTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="delTime != null and !"".equals(delTime)">
|
|
|
|
|
+ and del_time = #{delTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lockTime != null and !"".equals(lockTime)">
|
|
|
|
|
+ and lock_time = #{lockTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="lastLoginTime != null and !"".equals(lastLoginTime)">
|
|
|
|
|
+ and last_login_time = #{lastLoginTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="recommended != null and !"".equals(recommended)">
|
|
|
|
|
+ and recommended = #{recommended}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="selfRecommendCode != null and !"".equals(selfRecommendCode)">
|
|
|
|
|
+ and self_recommend_code = #{selfRecommendCode}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="commission != null and !"".equals(commission)">
|
|
|
|
|
+ and commission = #{commission}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="beloneStoreId != null and !"".equals(beloneStoreId)">
|
|
|
|
|
+ and belone_store_id = #{beloneStoreId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ LIMIT 1
|
|
|
|
|
+ </select>
|
|
|
|
|
+ <select id="getById" parameterType="java.lang.Long" resultType="com.pine.admin.modules.business.entity.Customer">
|
|
|
|
|
+ select id,username,mobile from ls_customer where id = #{id} and del_flag = '0'
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="delete">
|
|
|
|
|
+ UPDATE ls_customer SET del_flag = 'Y'
|
|
|
|
|
+ <where>
|
|
|
|
|
+ AND id = #{id}
|
|
|
|
|
+ </where>
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="deleteIds" parameterType="java.util.ArrayList">
|
|
|
|
|
+ UPDATE ls_customer SET del_flag = 'Y'
|
|
|
|
|
+ WHERE id IN
|
|
|
|
|
+ <foreach item='ids' collection="array" index="index" open="(" separator="," close=")">
|
|
|
|
|
+ #{ids}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+</mapper>
|