|
|
@@ -1107,13 +1107,11 @@
|
|
|
</select>
|
|
|
|
|
|
<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
|
|
|
+ select a.id,a.nickname as name,a.source,c.contacts contacts,c.contact_mobile as contactMobile,c.contacts_dep contactsDep,
|
|
|
+ c.contacts_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 (
|
|
|
- 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_identity c on a.id=c.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}
|
|
|
@@ -1168,7 +1166,7 @@
|
|
|
<if test="startTime != null and endTime != null">
|
|
|
and clock_in_time between #{startTime,jdbcType=VARCHAR} and #{endTime,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
- )e on a.id=d.uid
|
|
|
+ )e on a.id=e.uid
|
|
|
</if>
|
|
|
where a.type=1
|
|
|
<if test="type != 5 and type !=6">
|