anderx лет назад: 3
Родитель
Сommit
4905954c30

+ 1 - 1
src/main/java/com/goafanti/common/mapper/UserMapper.xml

@@ -1429,7 +1429,7 @@
     left join district_glossory dg2 on d.location_city = dg2.id
     left join district_glossory dg2 on d.location_city = dg2.id
     left join district_glossory dg3 on d.location_area = dg3.id
     left join district_glossory dg3 on d.location_area = dg3.id
     left join user_mid um on um.aid=a.aid and um.uid=a.id
     left join user_mid um on um.aid=a.aid and um.uid=a.id
-    where a.type= 1   and a.source in(1,2,3) and a.share_type = 0 and a.new_channel=0
+    where a.type= 1   and a.source in(1,2,3) and a.share_type = 0 and a.new_channel=1
     <if test="power ==0">
     <if test="power ==0">
       and a.aid = #{aid,jdbcType=VARCHAR}
       and a.aid = #{aid,jdbcType=VARCHAR}
     </if>
     </if>

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

@@ -2195,7 +2195,9 @@ inner join(
 		dg3.name as area,date_format(um.last_sign_time,'%Y-%m-%d %H:%i:%S') lastSignTime,
 		dg3.name as area,date_format(um.last_sign_time,'%Y-%m-%d %H:%i:%S') lastSignTime,
 		date_format(a.transfer_time,'%Y-%m-%d %H:%i:%S') as transferTime,a.introduction ,
 		date_format(a.transfer_time,'%Y-%m-%d %H:%i:%S') as transferTime,a.introduction ,
 		date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTime,
 		date_format(a.create_time,'%Y-%m-%d %H:%i:%S') as createTime,
-		date_format(um.last_follow_time,'%Y-%m-%d %H:%i:%S') lastFollowTime ,um.channel_type type
+		date_format(um.last_follow_time,'%Y-%m-%d %H:%i:%S') lastFollowTime ,
+		if(a.transfer_time &lt; um.last_follow_time,um.last_follow_time,a.transfer_time) as orderTime,
+		um.channel_type type
 		from user a left join admin b on a.aid=b.id left join organization_identity d on a.id = d.uid
 		from user a left join admin b on a.aid=b.id left join organization_identity d on a.id = d.uid
 		left join district_glossory dg1 on d.location_province = dg1.id
 		left join district_glossory dg1 on d.location_province = dg1.id
 		left join district_glossory dg2 on d.location_city = dg2.id
 		left join district_glossory dg2 on d.location_city = dg2.id
@@ -2229,7 +2231,7 @@ inner join(
 		<if test=" startDate !=null  and endDate !=null ">
 		<if test=" startDate !=null  and endDate !=null ">
 		and a.transfer_time between #{startDate} and #{endDate}
 		and a.transfer_time between #{startDate} and #{endDate}
 		</if>
 		</if>
-		order by  a.transfer_time,a.create_time desc
+		order by orderTime,a.transfer_time,a.create_time desc
 		<if test="page_sql != null">
 		<if test="page_sql != null">
 			${page_sql}
 			${page_sql}
 		</if>
 		</if>