|
|
@@ -103,9 +103,6 @@
|
|
|
left join district_glossory dg3 on b.area = dg3.id
|
|
|
left join industry_category c on b.industry = c.id
|
|
|
left join admin d on t0.aid = d.id where 1=1
|
|
|
- <if test="aid != null and aid !=''">
|
|
|
- and t0.aid = #{aid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
<if test="name != null and name != ''">
|
|
|
and t0.identify_name like concat('%',#{name},'%')
|
|
|
</if>
|
|
|
@@ -134,9 +131,6 @@
|
|
|
from
|
|
|
(select id,aid,type,share_type,transfer_time,identify_name,society_tag from user where aid = #{aid} and type = 0 and share_type = 0 and status != 1)t0
|
|
|
left join user_identity b on t0.id = b.uid where 1=1
|
|
|
- <if test="aid != null and aid !=''">
|
|
|
- and t0.aid = #{aid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
<if test="name != null and name != ''">
|
|
|
and t0.identify_name like concat('%',#{name},'%')
|
|
|
</if>
|
|
|
@@ -249,7 +243,7 @@
|
|
|
c.name as industry,
|
|
|
d.name as adminName
|
|
|
from
|
|
|
- (select buyer_id,salesman_id,max(sign_time) as last_sign_time from t_order where salesman_id = #{aid} and delete_sign != 1 group by buyer_id)t0
|
|
|
+ (select buyer_id,salesman_id,max(sign_time) as last_sign_time from t_order where salesman_id = #{aid} and order_status = 3 and delete_sign != 1 group by buyer_id)t0
|
|
|
<!-- (select uid,max(lock_time) from user_lock_release where aid = #{aid} and type = 1 and status = 0 group by uid)t0 -->
|
|
|
left join
|
|
|
(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
|
|
|
@@ -263,9 +257,6 @@
|
|
|
left join district_glossory dg3 on b.area = dg3.id
|
|
|
left join industry_category c on b.industry = c.id
|
|
|
left join admin d on t2.aid = d.id
|
|
|
- <if test="aid != null and aid !=''">
|
|
|
- and t2.aid = #{aid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
<if test="name != null and name != ''">
|
|
|
and t2.identify_name like concat('%',#{name},'%')
|
|
|
</if>
|
|
|
@@ -295,15 +286,12 @@
|
|
|
select
|
|
|
count(0)
|
|
|
from
|
|
|
- (select buyer_id,salesman_id,max(sign_time) as last_sign_time from t_order where salesman_id = #{aid} and delete_sign != 1 group by buyer_id)t0
|
|
|
+ (select buyer_id,salesman_id,max(sign_time) as last_sign_time from t_order where salesman_id = #{aid} and order_status = 3 and delete_sign != 1 group by buyer_id)t0
|
|
|
<!-- (select uid,max(lock_time) from user_lock_release where aid = #{aid} and type = 1 and status = 0 group by uid)t0 -->
|
|
|
inner join
|
|
|
(select id,aid,share_type,society_tag,identify_name,transfer_time from user where type = 0 and status != 1)t2
|
|
|
on t0.buyer_id = t2.id
|
|
|
left join user_identity b on t0.buyer_id = b.uid
|
|
|
- <if test="aid != null and aid !=''">
|
|
|
- and t2.aid = #{aid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
<if test="name != null and name != ''">
|
|
|
and t2.identify_name like concat('%',#{name},'%')
|
|
|
</if>
|
|
|
@@ -581,7 +569,7 @@
|
|
|
c.name as industry,
|
|
|
d.name as adminName
|
|
|
from
|
|
|
- (select buyer_id,salesman_id,max(sign_time) as last_sign_time from t_order where salesman_id = #{aid} and delete_sign != 1 group by buyer_id)t0
|
|
|
+ (select buyer_id,salesman_id,max(sign_time) as last_sign_time from t_order where salesman_id = #{aid} and order_status = 3 and delete_sign != 1 group by buyer_id)t0
|
|
|
left join
|
|
|
(select uid,aid,max(create_time) as last_follow_time from user_follow where aid = #{aid} group by uid)t1
|
|
|
on t0.buyer_id = t1.uid
|
|
|
@@ -594,9 +582,6 @@
|
|
|
left join district_glossory dg3 on b.location_area = dg3.id
|
|
|
left join industry_category c on b.industry = c.id
|
|
|
left join admin d on t2.aid = d.id where 1=1
|
|
|
- <if test="aid != null and aid !=''">
|
|
|
- and t2.aid = #{aid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
<if test="name != null and name != ''">
|
|
|
and t2.identify_name like concat('%',#{name},'%')
|
|
|
</if>
|
|
|
@@ -628,14 +613,11 @@
|
|
|
select
|
|
|
count(0)
|
|
|
from
|
|
|
- (select buyer_id,salesman_id,max(sign_time) as last_sign_time from t_order where salesman_id = #{aid} and delete_sign != 1 group by buyer_id)t0
|
|
|
+ (select buyer_id,salesman_id,max(sign_time) as last_sign_time from t_order where salesman_id = #{aid} and order_status = 3 and delete_sign != 1 group by buyer_id)t0
|
|
|
inner join
|
|
|
(select id,aid,share_type,society_tag,identify_name,transfer_time from user where type = 1)t2
|
|
|
on t0.buyer_id = t2.id
|
|
|
left join organization_identity b on t0.buyer_id = b.uid where 1=1
|
|
|
- <if test="aid != null and aid !=''">
|
|
|
- and t2.aid = #{aid,jdbcType=VARCHAR}
|
|
|
- </if>
|
|
|
<if test="name != null and name != ''">
|
|
|
and t2.identify_name like concat('%',#{name},'%')
|
|
|
</if>
|
|
|
@@ -1063,7 +1045,7 @@
|
|
|
from
|
|
|
user_business a inner join user b on
|
|
|
a.uid = b.id left join business_glossory c on
|
|
|
- a.business_glossory_id = c.id left join admin d on
|
|
|
+ a.business_project_id = c.id left join admin d on
|
|
|
a.aid = d.id
|
|
|
where 1 = 1
|
|
|
<if test="aid != null and aid != ''">
|
|
|
@@ -1072,8 +1054,8 @@
|
|
|
<if test="uid != null and uid !=''">
|
|
|
and a.uid = #{uid,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- <if test="businessGlossoryId !=null and businessGlossoryId != ''">
|
|
|
- and a.business_glossory_id = #{businessGlossoryId,jdbcType=VARCHAR}
|
|
|
+ <if test="businessProjectId !=null and businessProjectId != ''">
|
|
|
+ and a.business_project_id = #{businessProjectId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="identifyName != null and identifyName != ''">
|
|
|
and b.identify_name like concat('%', #{identifyName},'%')
|