|
|
@@ -2,29 +2,27 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.goafanti.common.dao.CustomerMapper">
|
|
|
<resultMap id="BaseResultMap" type="com.goafanti.common.model.Customer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
<result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
- <result column="company_name" jdbcType="VARCHAR" property="companyName" />
|
|
|
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
- <result column="company_industry" jdbcType="VARCHAR" property="companyIndustry" />
|
|
|
+ <result column="customer_typ" jdbcType="VARCHAR" property="customerTyp" />
|
|
|
+ <result column="share_typ" jdbcType="TIMESTAMP" property="shareTyp" />
|
|
|
+ <result column="agent_id" jdbcType="VARCHAR" property="agentId" />
|
|
|
<result column="company_intention" jdbcType="VARCHAR" property="companyIntention" />
|
|
|
- <result column="adress" jdbcType="VARCHAR" property="adress" />
|
|
|
- <result column="customer_name" jdbcType="VARCHAR" property="customerName" />
|
|
|
- <result column="customer_position" jdbcType="VARCHAR" property="customerPosition" />
|
|
|
- <result column="mobile" jdbcType="VARCHAR" property="mobile" />
|
|
|
- <result column="email" jdbcType="VARCHAR" property="email" />
|
|
|
- <result column="department" jdbcType="VARCHAR" property="department" />
|
|
|
- <result column="qq" jdbcType="VARCHAR" property="qq" />
|
|
|
- <result column="wechat" jdbcType="VARCHAR" property="wechat" />
|
|
|
- <result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
|
- <result column="province" jdbcType="VARCHAR" property="province" />
|
|
|
- <result column="fllow_situation" jdbcType="VARCHAR" property="fllowSituation" />
|
|
|
- <result column="sex" jdbcType="INTEGER" property="sex" />
|
|
|
+ <result column="create_time" jdbcType="VARCHAR" property="createTime" />
|
|
|
+ <result column="follow_situation" jdbcType="VARCHAR" property="followSituation" />
|
|
|
<result column="customer_statue" jdbcType="VARCHAR" property="customerStatue" />
|
|
|
- <result column="customer_typ" jdbcType="INTEGER" property="customerTyp" />
|
|
|
- <result column="tel_num" jdbcType="VARCHAR" property="telNum" />
|
|
|
</resultMap>
|
|
|
<sql id="Example_Where_Clause">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
<where>
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
<if test="criteria.valid">
|
|
|
@@ -54,6 +52,11 @@
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="Update_By_Example_Where_Clause">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
<where>
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
<if test="criteria.valid">
|
|
|
@@ -83,44 +86,85 @@
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="Base_Column_List">
|
|
|
- id, aid, company_name, create_time, company_industry, company_intention, adress,
|
|
|
- customer_name, customer_position, mobile, email, department, qq, wechat, remark,
|
|
|
- province, fllow_situation, sex, customer_statue
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
+ id, aid, customer_typ, share_typ, agent_id, company_intention, create_time, follow_situation,
|
|
|
+ customer_statue
|
|
|
</sql>
|
|
|
-
|
|
|
- <!-- 查询单个客户信息 -->
|
|
|
+ <select id="selectByExample" parameterType="com.goafanti.common.model.CustomerExample" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from customer
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from customer
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</select>
|
|
|
-
|
|
|
- <!-- 删除用户 -->
|
|
|
- <update id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
- update customer set delete_flg= 1
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
+ delete from customer
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
- </update>
|
|
|
-
|
|
|
- <!-- 新增客户 -->
|
|
|
- <insert id="insertCustomer" parameterType="com.goafanti.common.model.Customer">
|
|
|
- insert into customer (id, aid, company_name,
|
|
|
- create_time, company_industry, company_intention,
|
|
|
- adress, customer_name, customer_position,
|
|
|
- mobile, email, department,
|
|
|
- qq, wechat, remark,
|
|
|
- province, fllow_situation, sex,
|
|
|
- customer_statue,customer_typ,tel_num,typ,delete_flg)
|
|
|
- values (#{id,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR},
|
|
|
- #{createTime,jdbcType=TIMESTAMP}, #{companyIndustry,jdbcType=VARCHAR}, #{companyIntention,jdbcType=VARCHAR},
|
|
|
- #{adress,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR}, #{customerPosition,jdbcType=VARCHAR},
|
|
|
- #{mobile,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{department,jdbcType=VARCHAR},
|
|
|
- #{qq,jdbcType=VARCHAR}, #{wechat,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
|
|
- #{province,jdbcType=VARCHAR}, #{fllowSituation,jdbcType=VARCHAR}, #{sex,jdbcType=INTEGER},
|
|
|
- #{customerStatue,jdbcType=VARCHAR}, #{customerTyp,jdbcType=INTEGER}, #{telNum,jdbcType=VARCHAR},0,0)
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.goafanti.common.model.CustomerExample">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
+ delete from customer
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.goafanti.common.model.Customer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
+ insert into customer (id, aid, customer_typ,
|
|
|
+ share_typ, agent_id, company_intention,
|
|
|
+ create_time, follow_situation, customer_statue
|
|
|
+ )
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{customerTyp,jdbcType=VARCHAR},
|
|
|
+ #{shareTyp,jdbcType=TIMESTAMP}, #{agentId,jdbcType=VARCHAR}, #{companyIntention,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=VARCHAR}, #{followSituation,jdbcType=VARCHAR}, #{customerStatue,jdbcType=VARCHAR}
|
|
|
+ )
|
|
|
</insert>
|
|
|
-
|
|
|
- <insert id="insertSelective" parameterType="com.goafanti.common.model.Customer">
|
|
|
+ <insert id="insertCustomer" parameterType="com.goafanti.common.model.Customer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
insert into customer
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -129,53 +173,23 @@
|
|
|
<if test="aid != null">
|
|
|
aid,
|
|
|
</if>
|
|
|
- <if test="companyName != null">
|
|
|
- company_name,
|
|
|
+ <if test="customerTyp != null">
|
|
|
+ customer_typ,
|
|
|
</if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time,
|
|
|
+ <if test="shareTyp != null">
|
|
|
+ share_typ,
|
|
|
</if>
|
|
|
- <if test="companyIndustry != null">
|
|
|
- company_industry,
|
|
|
+ <if test="agentId != null">
|
|
|
+ agent_id,
|
|
|
</if>
|
|
|
<if test="companyIntention != null">
|
|
|
company_intention,
|
|
|
</if>
|
|
|
- <if test="adress != null">
|
|
|
- adress,
|
|
|
- </if>
|
|
|
- <if test="customerName != null">
|
|
|
- customer_name,
|
|
|
- </if>
|
|
|
- <if test="customerPosition != null">
|
|
|
- customer_position,
|
|
|
- </if>
|
|
|
- <if test="mobile != null">
|
|
|
- mobile,
|
|
|
- </if>
|
|
|
- <if test="email != null">
|
|
|
- email,
|
|
|
- </if>
|
|
|
- <if test="department != null">
|
|
|
- department,
|
|
|
- </if>
|
|
|
- <if test="qq != null">
|
|
|
- qq,
|
|
|
- </if>
|
|
|
- <if test="wechat != null">
|
|
|
- wechat,
|
|
|
- </if>
|
|
|
- <if test="remark != null">
|
|
|
- remark,
|
|
|
- </if>
|
|
|
- <if test="province != null">
|
|
|
- province,
|
|
|
- </if>
|
|
|
- <if test="fllowSituation != null">
|
|
|
- fllow_situation,
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
</if>
|
|
|
- <if test="sex != null">
|
|
|
- sex,
|
|
|
+ <if test="followSituation != null">
|
|
|
+ follow_situation,
|
|
|
</if>
|
|
|
<if test="customerStatue != null">
|
|
|
customer_statue,
|
|
|
@@ -188,115 +202,128 @@
|
|
|
<if test="aid != null">
|
|
|
#{aid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="companyName != null">
|
|
|
- #{companyName,jdbcType=VARCHAR},
|
|
|
+ <if test="customerTyp != null">
|
|
|
+ #{customerTyp,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="createTime != null">
|
|
|
- #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ <if test="shareTyp != null">
|
|
|
+ #{shareTyp,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
- <if test="companyIndustry != null">
|
|
|
- #{companyIndustry,jdbcType=VARCHAR},
|
|
|
+ <if test="agentId != null">
|
|
|
+ #{agentId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="companyIntention != null">
|
|
|
#{companyIntention,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="adress != null">
|
|
|
- #{adress,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="customerName != null">
|
|
|
- #{customerName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="customerPosition != null">
|
|
|
- #{customerPosition,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="mobile != null">
|
|
|
- #{mobile,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="email != null">
|
|
|
- #{email,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="department != null">
|
|
|
- #{department,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="qq != null">
|
|
|
- #{qq,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="wechat != null">
|
|
|
- #{wechat,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="remark != null">
|
|
|
- #{remark,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="province != null">
|
|
|
- #{province,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="fllowSituation != null">
|
|
|
- #{fllowSituation,jdbcType=VARCHAR},
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="sex != null">
|
|
|
- #{sex,jdbcType=INTEGER},
|
|
|
+ <if test="followSituation != null">
|
|
|
+ #{followSituation,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="customerStatue != null">
|
|
|
#{customerStatue,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
-
|
|
|
-
|
|
|
- <!-- 修改客户信息 -->
|
|
|
- <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Customer">
|
|
|
+ <select id="countByExample" parameterType="com.goafanti.common.model.CustomerExample" resultType="java.lang.Long">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
+ select count(*) from customer
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
update customer
|
|
|
<set>
|
|
|
- <if test="aid != null">
|
|
|
- aid = #{aid,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="companyName != null">
|
|
|
- company_name = #{companyName,jdbcType=VARCHAR},
|
|
|
+ <if test="record.id != null">
|
|
|
+ id = #{record.id,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="createTime != null">
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ <if test="record.aid != null">
|
|
|
+ aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="companyIndustry != null">
|
|
|
- company_industry = #{companyIndustry,jdbcType=VARCHAR},
|
|
|
+ <if test="record.customerTyp != null">
|
|
|
+ customer_typ = #{record.customerTyp,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="companyIntention != null">
|
|
|
- company_intention = #{companyIntention,jdbcType=VARCHAR},
|
|
|
+ <if test="record.shareTyp != null">
|
|
|
+ share_typ = #{record.shareTyp,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
- <if test="adress != null">
|
|
|
- adress = #{adress,jdbcType=VARCHAR},
|
|
|
+ <if test="record.agentId != null">
|
|
|
+ agent_id = #{record.agentId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="customerName != null">
|
|
|
- customer_name = #{customerName,jdbcType=VARCHAR},
|
|
|
+ <if test="record.companyIntention != null">
|
|
|
+ company_intention = #{record.companyIntention,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="customerPosition != null">
|
|
|
- customer_position = #{customerPosition,jdbcType=VARCHAR},
|
|
|
+ <if test="record.createTime != null">
|
|
|
+ create_time = #{record.createTime,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="mobile != null">
|
|
|
- mobile = #{mobile,jdbcType=VARCHAR},
|
|
|
+ <if test="record.followSituation != null">
|
|
|
+ follow_situation = #{record.followSituation,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="email != null">
|
|
|
- email = #{email,jdbcType=VARCHAR},
|
|
|
+ <if test="record.customerStatue != null">
|
|
|
+ customer_statue = #{record.customerStatue,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="department != null">
|
|
|
- department = #{department,jdbcType=VARCHAR},
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
+ update customer
|
|
|
+ set id = #{record.id,jdbcType=VARCHAR},
|
|
|
+ aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
+ customer_typ = #{record.customerTyp,jdbcType=VARCHAR},
|
|
|
+ share_typ = #{record.shareTyp,jdbcType=TIMESTAMP},
|
|
|
+ agent_id = #{record.agentId,jdbcType=VARCHAR},
|
|
|
+ company_intention = #{record.companyIntention,jdbcType=VARCHAR},
|
|
|
+ create_time = #{record.createTime,jdbcType=VARCHAR},
|
|
|
+ follow_situation = #{record.followSituation,jdbcType=VARCHAR},
|
|
|
+ customer_statue = #{record.customerStatue,jdbcType=VARCHAR}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.Customer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
+ update customer
|
|
|
+ <set>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="qq != null">
|
|
|
- qq = #{qq,jdbcType=VARCHAR},
|
|
|
+ <if test="customerTyp != null">
|
|
|
+ customer_typ = #{customerTyp,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="wechat != null">
|
|
|
- wechat = #{wechat,jdbcType=VARCHAR},
|
|
|
+ <if test="shareTyp != null">
|
|
|
+ share_typ = #{shareTyp,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
- <if test="remark != null">
|
|
|
- remark = #{remark,jdbcType=VARCHAR},
|
|
|
+ <if test="agentId != null">
|
|
|
+ agent_id = #{agentId,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="province != null">
|
|
|
- province = #{province,jdbcType=VARCHAR},
|
|
|
+ <if test="companyIntention != null">
|
|
|
+ company_intention = #{companyIntention,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="fllowSituation != null">
|
|
|
- fllow_situation = #{fllowSituation,jdbcType=VARCHAR},
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="sex != null">
|
|
|
- sex = #{sex,jdbcType=INTEGER},
|
|
|
+ <if test="followSituation != null">
|
|
|
+ follow_situation = #{followSituation,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="customerStatue != null">
|
|
|
customer_statue = #{customerStatue,jdbcType=VARCHAR},
|
|
|
@@ -304,87 +331,21 @@
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
-
|
|
|
-
|
|
|
- <!-- 分页查询客户 -->
|
|
|
- <select id="findSearchCustomerListByPage" resultType="com.goafanti.common.model.Customer">
|
|
|
- select
|
|
|
- a.id,
|
|
|
- a.company_name as companyName ,
|
|
|
- a.customer_typ as customerTyp ,
|
|
|
- a.province ,
|
|
|
- a.tel_num as telNum ,
|
|
|
- a.customer_name as customerName ,
|
|
|
- a.customer_statue as customerStatue,
|
|
|
- a.Company_intention as CompanyIntention ,
|
|
|
- a.fllow_situation as fllowSituation
|
|
|
- from aft.customer a
|
|
|
- where a.delete_flg = 0
|
|
|
- and a.aid=#{aid,jdbcType=VARCHAR}
|
|
|
- <if test="companyName != null">
|
|
|
- a.company_name = #{companyName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="telNum != null">
|
|
|
- a.tel_num = #{telNum,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="customerTyp != null">
|
|
|
- a.typ = #{customerTyp,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="companyIntention != null">
|
|
|
- a.company_intention = #{companyIntention,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="customerName != null">
|
|
|
- a.customer_name = #{customerName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="province != null">
|
|
|
- a.province = #{province,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="fllowSituation != null">
|
|
|
- a.fllow_situation = #{fllowSituation,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="customerStatue != null">
|
|
|
- a.customer_statue = #{customerStatue,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="page_sql != null">
|
|
|
- ${page_sql}
|
|
|
- </if>
|
|
|
-
|
|
|
- </select>
|
|
|
-
|
|
|
- <!-- 分页查询客户 -->
|
|
|
- <select id="findSearchCustomerCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
- select
|
|
|
- count(1)
|
|
|
- from customer a
|
|
|
- where a.delete_flg = 0
|
|
|
- and a.aid=#{aid,jdbcType=VARCHAR}
|
|
|
- <if test="companyName != null">
|
|
|
- a.company_name = #{companyName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="telNum != null">
|
|
|
- a.tel_num = #{telNum,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="customerTyp != null">
|
|
|
- a.typ = #{customerTyp,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="companyIntention != null">
|
|
|
- a.company_intention = #{companyIntention,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="customerName != null">
|
|
|
- a.customer_name = #{customerName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="province != null">
|
|
|
- a.province = #{province,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="fllowSituation != null">
|
|
|
- a.fllow_situation = #{fllowSituation,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="customerStatue != null">
|
|
|
- a.customer_statue = #{customerStatue,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="page_sql != null">
|
|
|
- ${page_sql}
|
|
|
- </if>
|
|
|
-
|
|
|
- </select>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Customer">
|
|
|
+ <!--
|
|
|
+ WARNING - @mbg.generated
|
|
|
+ This element is automatically generated by MyBatis Generator, do not modify.
|
|
|
+ This element was generated on Wed Oct 11 11:00:02 CST 2017.
|
|
|
+ -->
|
|
|
+ update customer
|
|
|
+ set aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ customer_typ = #{customerTyp,jdbcType=VARCHAR},
|
|
|
+ share_typ = #{shareTyp,jdbcType=TIMESTAMP},
|
|
|
+ agent_id = #{agentId,jdbcType=VARCHAR},
|
|
|
+ company_intention = #{companyIntention,jdbcType=VARCHAR},
|
|
|
+ create_time = #{createTime,jdbcType=VARCHAR},
|
|
|
+ follow_situation = #{followSituation,jdbcType=VARCHAR},
|
|
|
+ customer_statue = #{customerStatue,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
</mapper>
|