|
|
@@ -2,14 +2,9 @@
|
|
|
<!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 Tue Oct 10 10:30:05 CST 2017.
|
|
|
- -->
|
|
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
<result column="aid" jdbcType="VARCHAR" property="aid" />
|
|
|
- <result column="company_nmae" jdbcType="VARCHAR" property="companyNmae" />
|
|
|
+ <result column="company_nmae" jdbcType="VARCHAR" property="companyName" />
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
<result column="company_industry" jdbcType="VARCHAR" property="companyIndustry" />
|
|
|
<result column="company_intention" jdbcType="VARCHAR" property="companyIntention" />
|
|
|
@@ -30,11 +25,6 @@
|
|
|
<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 Tue Oct 10 10:30:05 CST 2017.
|
|
|
- -->
|
|
|
<where>
|
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
|
<if test="criteria.valid">
|
|
|
@@ -64,11 +54,6 @@
|
|
|
</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 Tue Oct 10 10:30:05 CST 2017.
|
|
|
- -->
|
|
|
<where>
|
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
|
<if test="criteria.valid">
|
|
|
@@ -98,21 +83,11 @@
|
|
|
</where>
|
|
|
</sql>
|
|
|
<sql id="Base_Column_List">
|
|
|
- <!--
|
|
|
- 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.
|
|
|
- -->
|
|
|
id, aid, company_nmae, create_time, company_industry, company_intention, adress,
|
|
|
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">
|
|
|
- <!--
|
|
|
- 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
|
|
|
<if test="distinct">
|
|
|
distinct
|
|
|
@@ -127,58 +102,38 @@
|
|
|
</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 Tue Oct 10 10:30:05 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= 0
|
|
|
+ update customer set delete_flg= 1
|
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
|
</update>
|
|
|
<delete id="deleteByExample" parameterType="java.lang.String">
|
|
|
- <!--
|
|
|
- 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.
|
|
|
- -->
|
|
|
delete from customer
|
|
|
<if test="_parameter != null">
|
|
|
<include refid="Example_Where_Clause" />
|
|
|
</if>
|
|
|
</delete>
|
|
|
<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 Tue Oct 10 10:30:05 CST 2017.
|
|
|
- -->
|
|
|
insert into customer (id, aid, company_nmae,
|
|
|
create_time, company_industry, company_intention,
|
|
|
adress, customer_name, customer_position,
|
|
|
mobile, email, department,
|
|
|
qq, wechat, remark,
|
|
|
province, fllow_situation, sex,
|
|
|
- customer_statue,cutomer_typ,tel_num,typ)
|
|
|
- values (#{id,jdbcType=VARCHAR}, #{aid,jdbcType=VARCHAR}, #{companyNmae,jdbcType=VARCHAR},
|
|
|
+ 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}, #{cutomerTyp,jdbcType=INTEGER}, #{telNum,jdbcType=VARCHAR},0)
|
|
|
+ #{customerStatue,jdbcType=VARCHAR}, #{customerTyp,jdbcType=INTEGER}, #{telNum,jdbcType=VARCHAR},0,0)
|
|
|
</insert>
|
|
|
<insert id="insertSelective" 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.
|
|
|
- -->
|
|
|
insert into customer
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">
|
|
|
@@ -187,7 +142,7 @@
|
|
|
<if test="aid != null">
|
|
|
aid,
|
|
|
</if>
|
|
|
- <if test="companyNmae != null">
|
|
|
+ <if test="companyName != null">
|
|
|
company_nmae,
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
@@ -246,8 +201,8 @@
|
|
|
<if test="aid != null">
|
|
|
#{aid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="companyNmae != null">
|
|
|
- #{companyNmae,jdbcType=VARCHAR},
|
|
|
+ <if test="companyName != null">
|
|
|
+ #{companyName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
|
@@ -324,8 +279,8 @@
|
|
|
<if test="record.aid != null">
|
|
|
aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="record.companyNmae != null">
|
|
|
- company_nmae = #{record.companyNmae,jdbcType=VARCHAR},
|
|
|
+ <if test="record.companyName != null">
|
|
|
+ company_nmae = #{record.companyName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="record.createTime != null">
|
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
|
@@ -389,7 +344,7 @@
|
|
|
update customer
|
|
|
set id = #{record.id,jdbcType=VARCHAR},
|
|
|
aid = #{record.aid,jdbcType=VARCHAR},
|
|
|
- company_nmae = #{record.companyNmae,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},
|
|
|
@@ -421,8 +376,8 @@
|
|
|
<if test="aid != null">
|
|
|
aid = #{aid,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="companyNmae != null">
|
|
|
- company_nmae = #{companyNmae,jdbcType=VARCHAR},
|
|
|
+ <if test="companyName != null">
|
|
|
+ company_nmae = #{companyName,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
@@ -483,7 +438,7 @@
|
|
|
-->
|
|
|
update customer
|
|
|
set aid = #{aid,jdbcType=VARCHAR},
|
|
|
- company_nmae = #{companyNmae,jdbcType=VARCHAR},
|
|
|
+ company_nmae = #{companyName,jdbcType=VARCHAR},
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
company_industry = #{companyIndustry,jdbcType=VARCHAR},
|
|
|
company_intention = #{companyIntention,jdbcType=VARCHAR},
|
|
|
@@ -507,93 +462,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <select id="findSearchAchievementListByPage" parameterType="String" resultType="com.goafanti.portal.bo.AchievementSearchListBo">
|
|
|
+ <select id="findSearchCustomerListByPage" resultType="com.goafanti.common.model.Customer">
|
|
|
select
|
|
|
- a.id, a.name, a.keyword,a.introduction,a.category,
|
|
|
- a.serial_number as serialNumber,
|
|
|
- a.data_category as dataCategory,
|
|
|
- a.owner_type as ownerType,
|
|
|
- a.owner_name as ownerName,
|
|
|
- a.field_a as fieldA,
|
|
|
- a.field_b as fieldB,
|
|
|
- a.transfer_price as transferPrice,
|
|
|
- a.maturity,
|
|
|
- a.introduction,
|
|
|
- a.transfer_mode as transferMode,
|
|
|
- a.technical_picture_url as technicalPictureUrl,
|
|
|
- b.name as fieldAs
|
|
|
- from achievement a
|
|
|
- left join field_glossory b on a.field_a = b.id
|
|
|
- where a.deleted_sign = 0
|
|
|
- <if test="dataCategory != null and dataCategory != ''">
|
|
|
- and a.data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="category != null and category != ''">
|
|
|
- and a.category = #{category,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="fieldA != null and fieldA != ''">
|
|
|
- and a.field_a = #{fieldA,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="keyword != null and keyword != ''">
|
|
|
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
- </if>
|
|
|
- <if test="transferMode != null">
|
|
|
- and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="upperPrice != null and upperPrice != ''">
|
|
|
- and a.transfer_price < #{upperPrice,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="lowerPrice != null and lowerPrice != ''">
|
|
|
- and a.transfer_price > #{lowerPrice,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
-
|
|
|
- and a.release_status = 1
|
|
|
- and a.audit_status = 3
|
|
|
- <if test="dateSort == 0">
|
|
|
- order by a.release_date asc
|
|
|
- </if>
|
|
|
- <if test="dateSort == 1">
|
|
|
- order by a.release_date desc
|
|
|
- </if>
|
|
|
+ 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="findSearchAchievementCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
+ <select id="findSearchCustomerCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
select
|
|
|
count(1)
|
|
|
- from achievement a
|
|
|
- where a.deleted_sign = 0
|
|
|
- <if test="dataCategory != null and dataCategory != ''">
|
|
|
- and a.data_category = #{dataCategory,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="category != null and category != ''">
|
|
|
- and a.category = #{category,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="fieldA != null and fieldA != ''">
|
|
|
- and a.field_a = #{fieldA,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="keyword != null and keyword != ''">
|
|
|
- and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
- </if>
|
|
|
- <if test="transferMode != null">
|
|
|
- and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
|
|
|
- </if>
|
|
|
- <if test="upperPrice != null and upperPrice != ''">
|
|
|
- and a.transfer_price < #{upperPrice,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
- <if test="lowerPrice != null and lowerPrice != ''">
|
|
|
- and a.transfer_price > #{lowerPrice,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
-
|
|
|
- and a.release_status = 1
|
|
|
- and a.audit_status = 3
|
|
|
- <if test="dateSort == 0">
|
|
|
- order by a.release_date asc
|
|
|
- </if>
|
|
|
- <if test="dateSort == 1">
|
|
|
- order by a.release_date desc
|
|
|
- </if>
|
|
|
+ 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>
|
|
|
</mapper>
|