|
|
@@ -87,36 +87,22 @@
|
|
|
customer_name, customer_position, mobile, email, department, qq, wechat, remark,
|
|
|
province, fllow_situation, sex, customer_statue
|
|
|
</sql>
|
|
|
- <select id="selectByExample" parameterType="com.goafanti.common.model.CustomerExample" resultMap="BaseResultMap">
|
|
|
- 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">
|
|
|
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
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
- <delete id="deleteByExample" parameterType="java.lang.String">
|
|
|
- delete from customer
|
|
|
- <if test="_parameter != null">
|
|
|
- <include refid="Example_Where_Clause" />
|
|
|
- </if>
|
|
|
- </delete>
|
|
|
+
|
|
|
+ <!-- 新增客户 -->
|
|
|
<insert id="insertCustomer" parameterType="com.goafanti.common.model.Customer">
|
|
|
insert into customer (id, aid, company_nmae,
|
|
|
create_time, company_industry, company_intention,
|
|
|
@@ -133,6 +119,7 @@
|
|
|
#{province,jdbcType=VARCHAR}, #{fllowSituation,jdbcType=VARCHAR}, #{sex,jdbcType=INTEGER},
|
|
|
#{customerStatue,jdbcType=VARCHAR}, #{customerTyp,jdbcType=INTEGER}, #{telNum,jdbcType=VARCHAR},0,0)
|
|
|
</insert>
|
|
|
+
|
|
|
<insert id="insertSelective" parameterType="com.goafanti.common.model.Customer">
|
|
|
insert into customer
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
@@ -254,123 +241,9 @@
|
|
|
</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
- <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 Tue Oct 10 10:30:05 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 Tue Oct 10 10:30:05 CST 2017.
|
|
|
- -->
|
|
|
- update customer
|
|
|
- <set>
|
|
|
- <if test="record.id != null">
|
|
|
- id = #{record.id,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.aid != null">
|
|
|
- aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.companyName != null">
|
|
|
- company_nmae = #{record.companyName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.createTime != null">
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
- </if>
|
|
|
- <if test="record.companyIndustry != null">
|
|
|
- company_industry = #{record.companyIndustry,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.companyIntention != null">
|
|
|
- company_intention = #{record.companyIntention,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.adress != null">
|
|
|
- adress = #{record.adress,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.customerName != null">
|
|
|
- customer_name = #{record.customerName,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.customerPosition != null">
|
|
|
- customer_position = #{record.customerPosition,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.mobile != null">
|
|
|
- mobile = #{record.mobile,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.email != null">
|
|
|
- email = #{record.email,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.department != null">
|
|
|
- department = #{record.department,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.qq != null">
|
|
|
- qq = #{record.qq,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.wechat != null">
|
|
|
- wechat = #{record.wechat,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.remark != null">
|
|
|
- remark = #{record.remark,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.province != null">
|
|
|
- province = #{record.province,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.fllowSituation != null">
|
|
|
- fllow_situation = #{record.fllowSituation,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- <if test="record.sex != null">
|
|
|
- sex = #{record.sex,jdbcType=INTEGER},
|
|
|
- </if>
|
|
|
- <if test="record.customerStatue != null">
|
|
|
- customer_statue = #{record.customerStatue,jdbcType=VARCHAR},
|
|
|
- </if>
|
|
|
- </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 Tue Oct 10 10:30:05 CST 2017.
|
|
|
- -->
|
|
|
- update customer
|
|
|
- set id = #{record.id,jdbcType=VARCHAR},
|
|
|
- aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
- company_nmae = #{record.companyName,jdbcType=VARCHAR},
|
|
|
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
- company_industry = #{record.companyIndustry,jdbcType=VARCHAR},
|
|
|
- company_intention = #{record.companyIntention,jdbcType=VARCHAR},
|
|
|
- adress = #{record.adress,jdbcType=VARCHAR},
|
|
|
- customer_name = #{record.customerName,jdbcType=VARCHAR},
|
|
|
- customer_position = #{record.customerPosition,jdbcType=VARCHAR},
|
|
|
- mobile = #{record.mobile,jdbcType=VARCHAR},
|
|
|
- email = #{record.email,jdbcType=VARCHAR},
|
|
|
- department = #{record.department,jdbcType=VARCHAR},
|
|
|
- qq = #{record.qq,jdbcType=VARCHAR},
|
|
|
- wechat = #{record.wechat,jdbcType=VARCHAR},
|
|
|
- remark = #{record.remark,jdbcType=VARCHAR},
|
|
|
- province = #{record.province,jdbcType=VARCHAR},
|
|
|
- fllow_situation = #{record.fllowSituation,jdbcType=VARCHAR},
|
|
|
- sex = #{record.sex,jdbcType=INTEGER},
|
|
|
- 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 Tue Oct 10 10:30:05 CST 2017.
|
|
|
- -->
|
|
|
+
|
|
|
+ <!-- 修改客户信息 -->
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.Customer">
|
|
|
update customer
|
|
|
<set>
|
|
|
<if test="aid != null">
|
|
|
@@ -430,38 +303,9 @@
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
- <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 Tue Oct 10 10:30:05 CST 2017.
|
|
|
- -->
|
|
|
- update customer
|
|
|
- set aid = #{aid,jdbcType=VARCHAR},
|
|
|
- company_nmae = #{companyName,jdbcType=VARCHAR},
|
|
|
- create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
- company_industry = #{companyIndustry,jdbcType=VARCHAR},
|
|
|
- company_intention = #{companyIntention,jdbcType=VARCHAR},
|
|
|
- adress = #{adress,jdbcType=VARCHAR},
|
|
|
- customer_name = #{customerName,jdbcType=VARCHAR},
|
|
|
- customer_position = #{customerPosition,jdbcType=VARCHAR},
|
|
|
- mobile = #{mobile,jdbcType=VARCHAR},
|
|
|
- email = #{email,jdbcType=VARCHAR},
|
|
|
- department = #{department,jdbcType=VARCHAR},
|
|
|
- qq = #{qq,jdbcType=VARCHAR},
|
|
|
- wechat = #{wechat,jdbcType=VARCHAR},
|
|
|
- remark = #{remark,jdbcType=VARCHAR},
|
|
|
- province = #{province,jdbcType=VARCHAR},
|
|
|
- fllow_situation = #{fllowSituation,jdbcType=VARCHAR},
|
|
|
- sex = #{sex,jdbcType=INTEGER},
|
|
|
- customer_statue = #{customerStatue,jdbcType=VARCHAR}
|
|
|
- where id = #{id,jdbcType=VARCHAR}
|
|
|
- </update>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
|
|
|
|
|
|
+ <!-- 分页查询客户 -->
|
|
|
<select id="findSearchCustomerListByPage" resultType="com.goafanti.common.model.Customer">
|
|
|
select
|
|
|
a.id,
|
|
|
@@ -506,6 +350,7 @@
|
|
|
|
|
|
</select>
|
|
|
|
|
|
+ <!-- 分页查询客户 -->
|
|
|
<select id="findSearchCustomerCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
select
|
|
|
count(1)
|