|
|
@@ -1106,15 +1106,12 @@
|
|
|
|
|
|
<select id="selectAdminCustomerDetailList" resultType="com.goafanti.admin.bo.AdminCustomerDetailBo">
|
|
|
select a.id,a.nickname as name,a.source,d.name contacts,d.mobile as contactMobile,d.department contactsDep,d.`position` contactsPosition,
|
|
|
- a.create_time as createTime,b.last_follow_time as followTime,c.location_province locationProvince,
|
|
|
- c.location_city locationCity,c.location_area locationArea,c.business_scope businessScope ,
|
|
|
- c.intended_project intendedProject
|
|
|
- from user a
|
|
|
- left join (select uid,last_follow_time from user_mid where aid= #{aid}) b on a.id=b.uid
|
|
|
- left join organization_identity c on a.id=c.uid
|
|
|
- left join (select y.id,y.uid,y.name ,y.mobile ,y.department ,y.`position`from (
|
|
|
+ a.create_time as createTime,b.last_follow_time as followTime,c.location_province locationProvince, c.location_city locationCity,
|
|
|
+ c.location_area locationArea,c.business_scope businessScope , c.intended_project intendedProject
|
|
|
+ from user a left join (select uid,last_follow_time from user_mid where aid= #{aid}) b on a.id=b.uid
|
|
|
+ left join organization_identity c on a.id=c.uid left join (select y.id,y.uid,y.name ,y.mobile ,y.department ,y.`position`from (
|
|
|
select uid,max(id)id from organization_contact_book where major =1 and aid = #{aid} group by uid )x
|
|
|
- left join organization_contact_book y on x.id=y.id) d on a.id =d.uid
|
|
|
+ left join organization_contact_book y on x.id=y.id) d on a.id =d.uid
|
|
|
<if test="type==5 or type==6">
|
|
|
left join (select aid,uid from public_release where clock_in =1
|
|
|
and aid= #{aid,jdbcType=VARCHAR}
|