|
@@ -1,119 +1,119 @@
|
|
|
<?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.hcloud.microserver.h5.dao.CustomerInfoMapper">
|
|
|
- <resultMap id="BaseResultMap" type="CustomerInfo">
|
|
|
- <id column="guid" jdbcType="CHAR" property="guid" />
|
|
|
- <result column="account" jdbcType="VARCHAR" property="account" />
|
|
|
- <result column="passwd" jdbcType="VARCHAR" property="passwd" />
|
|
|
- <result column="customer_type" jdbcType="INTEGER" property="customerType" />
|
|
|
- <result column="customer_name" jdbcType="VARCHAR" property="customerName" />
|
|
|
- <result column="nick_name" jdbcType="VARCHAR" property="nickName" />
|
|
|
- <result column="pid" jdbcType="CHAR" property="pid" />
|
|
|
- <result column="phone" jdbcType="CHAR" property="phone" />
|
|
|
- <result column="sex" jdbcType="INTEGER" property="sex" />
|
|
|
- <result column="score" jdbcType="INTEGER" property="score" />
|
|
|
- <result column="wx_id" jdbcType="VARCHAR" property="wxId" />
|
|
|
- <result column="union_id" jdbcType="VARCHAR" property="unionId" />
|
|
|
- <result column="head_image" jdbcType="VARCHAR" property="headImage" />
|
|
|
- <result column="is_company" jdbcType="INTEGER" property="isCompany" />
|
|
|
- <result column="is_validate" jdbcType="INTEGER" property="isValidate" />
|
|
|
- <result column="is_enable" jdbcType="INTEGER" property="isEnable" />
|
|
|
- <result column="state" jdbcType="INTEGER" property="state" />
|
|
|
- <result column="create_user" jdbcType="CHAR" property="createUser" />
|
|
|
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
- <result column="modified_user" jdbcType="CHAR" property="modifiedUser" />
|
|
|
+ <resultMap id="BaseResultMap" type="CustomerInfo">
|
|
|
+ <id column="guid" jdbcType="CHAR" property="guid"/>
|
|
|
+ <result column="account" jdbcType="VARCHAR" property="account"/>
|
|
|
+ <result column="passwd" jdbcType="VARCHAR" property="passwd"/>
|
|
|
+ <result column="customer_type" jdbcType="INTEGER" property="customerType"/>
|
|
|
+ <result column="customer_name" jdbcType="VARCHAR" property="customerName"/>
|
|
|
+ <result column="nick_name" jdbcType="VARCHAR" property="nickName"/>
|
|
|
+ <result column="pid" jdbcType="CHAR" property="pid"/>
|
|
|
+ <result column="phone" jdbcType="CHAR" property="phone"/>
|
|
|
+ <result column="sex" jdbcType="INTEGER" property="sex"/>
|
|
|
+ <result column="score" jdbcType="INTEGER" property="score"/>
|
|
|
+ <result column="wx_id" jdbcType="VARCHAR" property="wxId"/>
|
|
|
+ <result column="union_id" jdbcType="VARCHAR" property="unionId"/>
|
|
|
+ <result column="head_image" jdbcType="VARCHAR" property="headImage"/>
|
|
|
+ <result column="is_company" jdbcType="INTEGER" property="isCompany"/>
|
|
|
+ <result column="is_validate" jdbcType="INTEGER" property="isValidate"/>
|
|
|
+ <result column="is_enable" jdbcType="INTEGER" property="isEnable"/>
|
|
|
+ <result column="state" jdbcType="INTEGER" property="state"/>
|
|
|
+ <result column="create_user" jdbcType="CHAR" property="createUser"/>
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
+ <result column="modified_user" jdbcType="CHAR" property="modifiedUser"/>
|
|
|
|
|
|
|
|
|
- <result column="modified_time" jdbcType="TIMESTAMP" property="modifiedTime" />
|
|
|
- </resultMap>
|
|
|
- <sql id="Base_Column_List">
|
|
|
+ <result column="modified_time" jdbcType="TIMESTAMP" property="modifiedTime"/>
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
guid, account, passwd, customer_type, customer_name, nick_name, pid, phone, sex,
|
|
|
score, wx_id, union_id,head_image,is_company, is_validate, is_enable, state, create_user, create_time,
|
|
|
modified_user, modified_time
|
|
|
</sql>
|
|
|
- <sql id="Base_Column_List_spc">
|
|
|
+ <sql id="Base_Column_List_spc">
|
|
|
aa.guid,aa.account, aa.passwd, aa.customer_type, aa.customer_name, aa.nick_name, aa.pid, aa.phone, aa.sex,
|
|
|
aa.score, aa.wx_id, aa.union_id,aa.head_image,aa.is_company, aa.is_validate, aa.is_enable, aa.state, aa.create_user,
|
|
|
aa.create_time,aa.modified_user, aa.modified_time
|
|
|
</sql>
|
|
|
- <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- from t_customer_info
|
|
|
- where guid = #{guid,jdbcType=CHAR}
|
|
|
- </select>
|
|
|
- <select id="searchCustomerByPage" parameterType="com.hcloud.microserver.commoncore.base.PageBean"
|
|
|
- resultType="com.hcloud.microserver.h5.bo.CustomerInfoBO">
|
|
|
- SELECT
|
|
|
- aa.guid,
|
|
|
- aa.account AS account,
|
|
|
- aa.customer_name AS customerName,
|
|
|
- CASE aa.customer_type
|
|
|
- WHEN 1 THEN
|
|
|
- '自然人'
|
|
|
- WHEN 2 THEN
|
|
|
- '履约企业'
|
|
|
- ELSE
|
|
|
- '非履约企业'
|
|
|
- END AS customerType,
|
|
|
- aa.is_company AS isCompany,
|
|
|
- aa.is_validate AS isValidate,
|
|
|
- aa.nick_name AS nickName,
|
|
|
- aa.phone AS customerPhone,
|
|
|
- aa.pid AS pid,
|
|
|
- aa.score AS score,
|
|
|
- aa.create_time as createTime,
|
|
|
- aa.modified_time as modifiedTime,
|
|
|
- aa.is_enable as isEnable,
|
|
|
- aa.wx_id as wxId,
|
|
|
- aa.phone,
|
|
|
- CASE aa.sex
|
|
|
- WHEN 1 THEN
|
|
|
- '男'
|
|
|
- ELSE
|
|
|
- '女'
|
|
|
- END AS sexName,
|
|
|
- bb.company_name AS companyName,
|
|
|
- bb.principals AS principals,
|
|
|
- bb.phone AS companyPhone
|
|
|
- FROM
|
|
|
- t_customer_info aa
|
|
|
- LEFT JOIN t_customer_company_info bb ON aa.guid = bb.fk_customer_id
|
|
|
- <where>
|
|
|
- aa.state = 1
|
|
|
- <if test="data.customerName != null and data.customerName != ''">
|
|
|
- and aa.customer_name like concat('%',#{data.customerName},'%')
|
|
|
- </if>
|
|
|
- <if test="data.phone != null and data.phone != ''">
|
|
|
- and aa.phone like concat('%',#{data.phone},'%')
|
|
|
- </if>
|
|
|
- <if test="data.account != null and data.account != ''">
|
|
|
- and aa.account like concat('%', #{data.account}, '%')
|
|
|
- </if>
|
|
|
- <if test="data.customerType != null">
|
|
|
- and aa.customer_type = #{data.customerType}
|
|
|
- </if>
|
|
|
- <if test="data.isValidate != null">
|
|
|
- and aa.is_validate = #{data.isValidate}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- order by aa.modified_time desc
|
|
|
- </select>
|
|
|
- <select id="searchCustomerByAccount" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- from t_customer_info
|
|
|
- where account = #{account,jdbcType=CHAR} limit 1
|
|
|
- </select>
|
|
|
- <select id="getCustomerByInfo" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
- <include refid="Base_Column_List" />
|
|
|
- from t_customer_info
|
|
|
- where
|
|
|
- state =1
|
|
|
- and (account=#{queryStr,jdbcType=VARCHAR} or phone=#{queryStr,jdbcType=VARCHAR})
|
|
|
- </select>
|
|
|
- <select id="getCustomerByThreeCode" resultType="com.hcloud.microserver.h5.bo.CustomerInfoBO">
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from t_customer_info
|
|
|
+ where guid = #{guid,jdbcType=CHAR}
|
|
|
+ </select>
|
|
|
+ <select id="searchCustomerByPage" parameterType="com.hcloud.microserver.commoncore.base.PageBean"
|
|
|
+ resultType="com.hcloud.microserver.h5.bo.CustomerInfoBO">
|
|
|
+ SELECT
|
|
|
+ aa.guid,
|
|
|
+ aa.account AS account,
|
|
|
+ aa.customer_name AS customerName,
|
|
|
+ CASE aa.customer_type
|
|
|
+ WHEN 1 THEN
|
|
|
+ '自然人'
|
|
|
+ WHEN 2 THEN
|
|
|
+ '履约企业'
|
|
|
+ ELSE
|
|
|
+ '非履约企业'
|
|
|
+ END AS customerType,
|
|
|
+ aa.is_company AS isCompany,
|
|
|
+ aa.is_validate AS isValidate,
|
|
|
+ aa.nick_name AS nickName,
|
|
|
+ aa.phone AS customerPhone,
|
|
|
+ aa.pid AS pid,
|
|
|
+ aa.score AS score,
|
|
|
+ aa.create_time as createTime,
|
|
|
+ aa.modified_time as modifiedTime,
|
|
|
+ aa.is_enable as isEnable,
|
|
|
+ aa.wx_id as wxId,
|
|
|
+ aa.phone,
|
|
|
+ CASE aa.sex
|
|
|
+ WHEN 1 THEN
|
|
|
+ '男'
|
|
|
+ ELSE
|
|
|
+ '女'
|
|
|
+ END AS sexName,
|
|
|
+ bb.company_name AS companyName,
|
|
|
+ bb.principals AS principals,
|
|
|
+ bb.phone AS companyPhone
|
|
|
+ FROM
|
|
|
+ t_customer_info aa
|
|
|
+ LEFT JOIN t_customer_company_info bb ON aa.guid = bb.fk_customer_id
|
|
|
+ <where>
|
|
|
+ aa.state = 1
|
|
|
+ <if test="data.customerName != null and data.customerName != ''">
|
|
|
+ and aa.customer_name like concat('%',#{data.customerName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="data.phone != null and data.phone != ''">
|
|
|
+ and aa.phone like concat('%',#{data.phone},'%')
|
|
|
+ </if>
|
|
|
+ <if test="data.account != null and data.account != ''">
|
|
|
+ and aa.account like concat('%', #{data.account}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="data.customerType != null">
|
|
|
+ and aa.customer_type = #{data.customerType}
|
|
|
+ </if>
|
|
|
+ <if test="data.isValidate != null">
|
|
|
+ and aa.is_validate = #{data.isValidate}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by aa.modified_time desc
|
|
|
+ </select>
|
|
|
+ <select id="searchCustomerByAccount" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from t_customer_info
|
|
|
+ where account = #{account,jdbcType=CHAR} limit 1
|
|
|
+ </select>
|
|
|
+ <select id="getCustomerByInfo" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List"/>
|
|
|
+ from t_customer_info
|
|
|
+ where
|
|
|
+ state =1
|
|
|
+ and (account=#{queryStr,jdbcType=VARCHAR} or phone=#{queryStr,jdbcType=VARCHAR})
|
|
|
+ </select>
|
|
|
+ <select id="getCustomerByThreeCode" resultType="com.hcloud.microserver.h5.bo.CustomerInfoBO">
|
|
|
SELECT
|
|
|
aa.guid as guid,
|
|
|
aa.account as account,
|
|
@@ -139,7 +139,7 @@
|
|
|
AND bb.channel_type =#{channel}
|
|
|
AND (bb.channel_keyword_one = #{code} or bb.channel_keyword_two=#{code})
|
|
|
</select>
|
|
|
- <select id="getCustomerStatisticalInfo" resultType="com.hcloud.microserver.h5.bo.CustomerInfoBO">
|
|
|
+ <select id="getCustomerStatisticalInfo" resultType="com.hcloud.microserver.h5.bo.CustomerInfoBO">
|
|
|
SELECT
|
|
|
aa.fk_customer_guid AS customId,
|
|
|
SUM(bb.sale_num) AS carbonAmount,
|
|
@@ -158,7 +158,7 @@
|
|
|
aa.fk_customer_guid
|
|
|
</select>
|
|
|
|
|
|
- <select id="wxlogin" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ <select id="wxlogin" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
SELECT
|
|
|
a.*
|
|
|
FROM
|
|
@@ -169,11 +169,11 @@
|
|
|
OR a.union_id = #{myWxMpUser.unionId}
|
|
|
LIMIT 1
|
|
|
</select>
|
|
|
- <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
delete from t_customer_info
|
|
|
where guid = #{guid,jdbcType=CHAR}
|
|
|
</delete>
|
|
|
- <insert id="insert" parameterType="CustomerInfo">
|
|
|
+ <insert id="insert" parameterType="CustomerInfo">
|
|
|
insert into t_customer_info (guid, account, passwd,
|
|
|
customer_type, customer_name, nick_name,
|
|
|
pid, phone, sex, score,
|
|
@@ -189,206 +189,206 @@
|
|
|
#{createUser,jdbcType=CHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifiedUser,jdbcType=CHAR},
|
|
|
#{modifiedTime,jdbcType=TIMESTAMP})
|
|
|
</insert>
|
|
|
- <insert id="insertSelective" parameterType="CustomerInfo">
|
|
|
- insert into t_customer_info
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="guid != null">
|
|
|
- guid,
|
|
|
- </if>
|
|
|
- <if test="account != null">
|
|
|
- account,
|
|
|
- </if>
|
|
|
- <if test="passwd != null">
|
|
|
- passwd,
|
|
|
- </if>
|
|
|
- <if test="customerType != null">
|
|
|
- customer_type,
|
|
|
- </if>
|
|
|
- <if test="customerName != null">
|
|
|
- customer_name,
|
|
|
- </if>
|
|
|
- <if test="nickName != null">
|
|
|
- nick_name,
|
|
|
- </if>
|
|
|
- <if test="pid != null">
|
|
|
- pid,
|
|
|
- </if>
|
|
|
- <if test="phone != null">
|
|
|
- phone,
|
|
|
- </if>
|
|
|
- <if test="sex != null">
|
|
|
- sex,
|
|
|
- </if>
|
|
|
- <if test="score != null">
|
|
|
- score,
|
|
|
- </if>
|
|
|
- <if test="wxId != null">
|
|
|
- wx_id,
|
|
|
- </if>
|
|
|
- <if test="unionId != null">
|
|
|
- union_id,
|
|
|
- </if>
|
|
|
- <if test="headImage != null">
|
|
|
- head_image,
|
|
|
- </if>
|
|
|
- <if test="isCompany != null">
|
|
|
- is_company,
|
|
|
- </if>
|
|
|
- <if test="isValidate != null">
|
|
|
- is_validate,
|
|
|
- </if>
|
|
|
- <if test="isEnable != null">
|
|
|
- is_enable,
|
|
|
- </if>
|
|
|
- <if test="state != null">
|
|
|
- state,
|
|
|
- </if>
|
|
|
- <if test="createUser != null">
|
|
|
- create_user,
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time,
|
|
|
- </if>
|
|
|
- <if test="modifiedUser != null">
|
|
|
- modified_user,
|
|
|
- </if>
|
|
|
- <if test="modifiedTime != null">
|
|
|
- modified_time,
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="guid != null">
|
|
|
- #{guid,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="account != null">
|
|
|
- #{account,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="passwd != null">
|
|
|
- #{passwd,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="customerType != null">
|
|
|
- #{customerType,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="customerName != null">
|
|
|
- #{customerName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="nickName != null">
|
|
|
- #{nickName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="pid != null">
|
|
|
- #{pid,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="phone != null">
|
|
|
- #{phone,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="sex != null">
|
|
|
- #{sex,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="score != null">
|
|
|
- #{score,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="wxId != null">
|
|
|
- #{wxId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="unionId != null">
|
|
|
- #{unionId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="headImage != null">
|
|
|
- #{headImage,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="isCompany != null">
|
|
|
- #{isCompany,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="isValidate != null">
|
|
|
- #{isValidate,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="isEnable != null">
|
|
|
- #{isEnable,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="state != null">
|
|
|
- #{state,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="createUser != null">
|
|
|
- #{createUser,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- #{createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="modifiedUser != null">
|
|
|
- #{modifiedUser,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="modifiedTime != null">
|
|
|
- #{modifiedTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
- <update id="updateByPrimaryKeySelective" parameterType="CustomerInfo">
|
|
|
- update t_customer_info
|
|
|
- <set>
|
|
|
- <if test="account != null">
|
|
|
- account = #{account,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="passwd != null">
|
|
|
- passwd = #{passwd,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="customerType != null">
|
|
|
- customer_type = #{customerType,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="customerName != null">
|
|
|
- customer_name = #{customerName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="nickName != null">
|
|
|
- nick_name = #{nickName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="pid != null">
|
|
|
- pid = #{pid,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="phone != null">
|
|
|
- phone = #{phone,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="sex != null">
|
|
|
- sex = #{sex,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="score != null">
|
|
|
- score = #{score,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="wxId != null">
|
|
|
- wx_id = #{wxId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="unionId != null">
|
|
|
- union_id = #{unionId,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="headImage != null">
|
|
|
- head_image = #{headImage,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="isCompany != null">
|
|
|
- is_company = #{isCompany,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="isValidate != null">
|
|
|
- is_validate = #{isValidate,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="isEnable != null">
|
|
|
- is_enable = #{isEnable,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="state != null">
|
|
|
- state = #{state,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="createUser != null">
|
|
|
- create_user = #{createUser,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="modifiedUser != null">
|
|
|
- modified_user = #{modifiedUser,jdbcType=CHAR},
|
|
|
- </if>
|
|
|
- <if test="modifiedTime != null">
|
|
|
- modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- </set>
|
|
|
- where guid = #{guid,jdbcType=CHAR}
|
|
|
- </update>
|
|
|
- <update id="updateByPrimaryKey" parameterType="CustomerInfo">
|
|
|
+ <insert id="insertSelective" parameterType="CustomerInfo">
|
|
|
+ insert into t_customer_info
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="guid != null">
|
|
|
+ guid,
|
|
|
+ </if>
|
|
|
+ <if test="account != null">
|
|
|
+ account,
|
|
|
+ </if>
|
|
|
+ <if test="passwd != null">
|
|
|
+ passwd,
|
|
|
+ </if>
|
|
|
+ <if test="customerType != null">
|
|
|
+ customer_type,
|
|
|
+ </if>
|
|
|
+ <if test="customerName != null">
|
|
|
+ customer_name,
|
|
|
+ </if>
|
|
|
+ <if test="nickName != null">
|
|
|
+ nick_name,
|
|
|
+ </if>
|
|
|
+ <if test="pid != null">
|
|
|
+ pid,
|
|
|
+ </if>
|
|
|
+ <if test="phone != null">
|
|
|
+ phone,
|
|
|
+ </if>
|
|
|
+ <if test="sex != null">
|
|
|
+ sex,
|
|
|
+ </if>
|
|
|
+ <if test="score != null">
|
|
|
+ score,
|
|
|
+ </if>
|
|
|
+ <if test="wxId != null">
|
|
|
+ wx_id,
|
|
|
+ </if>
|
|
|
+ <if test="unionId != null">
|
|
|
+ union_id,
|
|
|
+ </if>
|
|
|
+ <if test="headImage != null">
|
|
|
+ head_image,
|
|
|
+ </if>
|
|
|
+ <if test="isCompany != null">
|
|
|
+ is_company,
|
|
|
+ </if>
|
|
|
+ <if test="isValidate != null">
|
|
|
+ is_validate,
|
|
|
+ </if>
|
|
|
+ <if test="isEnable != null">
|
|
|
+ is_enable,
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ state,
|
|
|
+ </if>
|
|
|
+ <if test="createUser != null">
|
|
|
+ create_user,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="modifiedUser != null">
|
|
|
+ modified_user,
|
|
|
+ </if>
|
|
|
+ <if test="modifiedTime != null">
|
|
|
+ modified_time,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="guid != null">
|
|
|
+ #{guid,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="account != null">
|
|
|
+ #{account,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="passwd != null">
|
|
|
+ #{passwd,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="customerType != null">
|
|
|
+ #{customerType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="customerName != null">
|
|
|
+ #{customerName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="nickName != null">
|
|
|
+ #{nickName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pid != null">
|
|
|
+ #{pid,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="phone != null">
|
|
|
+ #{phone,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sex != null">
|
|
|
+ #{sex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="score != null">
|
|
|
+ #{score,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="wxId != null">
|
|
|
+ #{wxId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="unionId != null">
|
|
|
+ #{unionId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="headImage != null">
|
|
|
+ #{headImage,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="isCompany != null">
|
|
|
+ #{isCompany,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="isValidate != null">
|
|
|
+ #{isValidate,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="isEnable != null">
|
|
|
+ #{isEnable,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ #{state,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createUser != null">
|
|
|
+ #{createUser,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="modifiedUser != null">
|
|
|
+ #{modifiedUser,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="modifiedTime != null">
|
|
|
+ #{modifiedTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="CustomerInfo">
|
|
|
+ update t_customer_info
|
|
|
+ <set>
|
|
|
+ <if test="account != null">
|
|
|
+ account = #{account,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="passwd != null">
|
|
|
+ passwd = #{passwd,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="customerType != null">
|
|
|
+ customer_type = #{customerType,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="customerName != null">
|
|
|
+ customer_name = #{customerName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="nickName != null">
|
|
|
+ nick_name = #{nickName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pid != null">
|
|
|
+ pid = #{pid,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="phone != null">
|
|
|
+ phone = #{phone,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="sex != null">
|
|
|
+ sex = #{sex,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="score != null">
|
|
|
+ score = #{score,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="wxId != null">
|
|
|
+ wx_id = #{wxId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="unionId != null">
|
|
|
+ union_id = #{unionId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="headImage != null">
|
|
|
+ head_image = #{headImage,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="isCompany != null">
|
|
|
+ is_company = #{isCompany,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="isValidate != null">
|
|
|
+ is_validate = #{isValidate,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="isEnable != null">
|
|
|
+ is_enable = #{isEnable,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="state != null">
|
|
|
+ state = #{state,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createUser != null">
|
|
|
+ create_user = #{createUser,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="modifiedUser != null">
|
|
|
+ modified_user = #{modifiedUser,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="modifiedTime != null">
|
|
|
+ modified_time = #{modifiedTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where guid = #{guid,jdbcType=CHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="CustomerInfo">
|
|
|
update t_customer_info
|
|
|
set account = #{account,jdbcType=VARCHAR},
|
|
|
passwd = #{passwd,jdbcType=VARCHAR},
|