|
@@ -8,7 +8,8 @@
|
|
|
<result column="company_id" property="companyId" />
|
|
|
<result column="clue_name" property="clueName" />
|
|
|
<result column="clue_source_id" property="clueSourceId" />
|
|
|
- <result column="contact_information" property="contactInformation" />
|
|
|
+ <result column="phone" property="phone" />
|
|
|
+ <result column="email" property="email" />
|
|
|
<result column="customer_industry_id" property="customerIndustryId" />
|
|
|
<result column="customer_level_id" property="customerLevelId" />
|
|
|
<result column="address" property="address" />
|
|
@@ -20,11 +21,126 @@
|
|
|
<result column="plate3" property="plate3" />
|
|
|
<result column="plate4" property="plate4" />
|
|
|
<result column="plate5" property="plate5" />
|
|
|
+ <result column="company_name" property="companyName" />
|
|
|
+ <result column="create_time" property="createTime" />
|
|
|
+ <result column="create_id" property="createId" />
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
- id, company_id, clue_name, clue_source_id, contact_information, customer_industry_id, customer_level_id, address, incharger_id, remark, is_delete, plate1, plate2, plate3, plate4, plate5
|
|
|
+ id, company_id, clue_name, clue_source_id, phone , email, customer_industry_id, customer_level_id, address, incharger_id, remark, is_delete, plate1, plate2, plate3, plate4, plate5,create_time,createId
|
|
|
</sql>
|
|
|
+ <select id="list" resultType="com.management.platform.entity.Clue">
|
|
|
+ select c.id,
|
|
|
+ c.company_id,
|
|
|
+ (select company_name from company where company_id = c.id) companyName,
|
|
|
+ c.clue_name,
|
|
|
+ c.clue_source_id,
|
|
|
+ c.phone,
|
|
|
+ c.email,
|
|
|
+ c.customer_industry_id,
|
|
|
+ c.customer_level_id,
|
|
|
+ c.address,
|
|
|
+ c.incharger_id,
|
|
|
+ c.remark,
|
|
|
+ c.is_delete,
|
|
|
+ c.plate1,
|
|
|
+ c.plate2,
|
|
|
+ c.plate3,
|
|
|
+ c.plate4,
|
|
|
+ c.plate5,
|
|
|
+ c.create_time,
|
|
|
+ c.create_id
|
|
|
+ from Clue c
|
|
|
+ where
|
|
|
+ c.company_id = #{companyId} and is_delete = 0
|
|
|
+ <if test="startTime != null and endTime != null ">
|
|
|
+ and c.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="clueName != null and clueName != '' ">
|
|
|
+ and c.clue_name = #{clueName}
|
|
|
+ </if>
|
|
|
+ <if test="clueSourceId != null">
|
|
|
+ and c.clue_source_id = #{clueSourceId}
|
|
|
+ </if>
|
|
|
+ <if test="customerIndustryId != null">
|
|
|
+ and c.customer_industry_id = #{customerIndustryId}
|
|
|
+ </if>
|
|
|
+ limit #{pageIndex},#{pageFrom}
|
|
|
+ </select>
|
|
|
+ <select id="Deleterlist" resultType="com.management.platform.entity.Clue">
|
|
|
+ select c.id,
|
|
|
+ c.company_id,
|
|
|
+ (select company_name from company where company_id = c.id) companyName,
|
|
|
+ c.clue_name,
|
|
|
+ c.clue_source_id,
|
|
|
+ c.phone,
|
|
|
+ c.email,
|
|
|
+ c.customer_industry_id,
|
|
|
+ c.customer_level_id,
|
|
|
+ c.address,
|
|
|
+ c.incharger_id,
|
|
|
+ c.remark,
|
|
|
+ c.is_delete,
|
|
|
+ c.plate1,
|
|
|
+ c.plate2,
|
|
|
+ c.plate3,
|
|
|
+ c.plate4,
|
|
|
+ c.plate5,
|
|
|
+ c.create_time,
|
|
|
+ c.create_id
|
|
|
+ from Clue c
|
|
|
+ where
|
|
|
+ c.company_id = #{companyId} and is_delete = 1
|
|
|
+ <if test="startTime != null and endTime != null ">
|
|
|
+ and c.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="clueName != null and clueName != '' ">
|
|
|
+ and c.clue_name = #{clueName}
|
|
|
+ </if>
|
|
|
+ <if test="clueSourceId != null">
|
|
|
+ and c.clue_source_id = #{clueSourceId}
|
|
|
+ </if>
|
|
|
+ <if test="customerIndustryId != null">
|
|
|
+ and c.customer_industry_id = #{customerIndustryId}
|
|
|
+ </if>
|
|
|
+ limit #{pageIndex},#{pageFrom}
|
|
|
+ </select>
|
|
|
+ <select id="getTotal" resultType="java.lang.Integer">
|
|
|
+ select count(*)
|
|
|
+ from Clue c
|
|
|
+ where
|
|
|
+ c.company_id = #{companyId} and is_delete = 0
|
|
|
+ <if test="startTime != null and endTime != null ">
|
|
|
+ and c.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="clueName != null and clueName != '' ">
|
|
|
+ and c.clue_name = #{clueName}
|
|
|
+ </if>
|
|
|
+ <if test="clueSourceId != null">
|
|
|
+ and c.clue_source_id = #{clueSourceId}
|
|
|
+ </if>
|
|
|
+ <if test="customerIndustryId != null">
|
|
|
+ and c.customer_industry_id = #{customerIndustryId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="getDeleterTotal" resultType="java.lang.Integer">
|
|
|
+ select count(*)
|
|
|
+ from Clue c
|
|
|
+ where
|
|
|
+ c.company_id = #{companyId} and is_delete = 1
|
|
|
+ <if test="startTime != null and endTime != null ">
|
|
|
+ and c.create_time BETWEEN #{startTime} and #{endTime}
|
|
|
+ </if>
|
|
|
+ <if test="clueName != null and clueName != '' ">
|
|
|
+ and c.clue_name = #{clueName}
|
|
|
+ </if>
|
|
|
+ <if test="clueSourceId != null">
|
|
|
+ and c.clue_source_id = #{clueSourceId}
|
|
|
+ </if>
|
|
|
+ <if test="customerIndustryId != null">
|
|
|
+ and c.customer_industry_id = #{customerIndustryId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
|
|
|
</mapper>
|