Browse Source

修改客户查询效率

wanghui 7 years ago
parent
commit
b7dff846fe
1 changed files with 19 additions and 2 deletions
  1. 19 2
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

+ 19 - 2
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -172,7 +172,7 @@
 			a.lvl,
 			a.is_member as isMember,
 			a.society_tag as societyTag,
-			share_type as shareType,
+			a.share_type as shareType,
 			b.contacts,
 			b.contact_mobile as contactMobile,
 			b.international,
@@ -184,7 +184,24 @@
 			dg3.name as area,
 			c.name as industry,
 			d.name as adminName		
-		from user a inner join organization_identity b on a.id = b.uid
+		from 
+		(	select 
+				id,
+				aid,
+				type,
+				status, 
+				create_time,
+				business_audit,
+				current_member_status,
+				identify_name,
+				lvl,
+				is_member,
+				society_tag,
+				share_type,
+				audit_status
+			from user order by create_time desc
+		)a
+		inner join organization_identity b on a.id = b.uid
 		left join district_glossory dg1 on b.location_province = dg1.id
 		left join district_glossory dg2 on b.location_city = dg2.id
 		left join district_glossory dg3 on b.location_area = dg3.id