Parcourir la source

修改专家列表BUG

anderx il y a 7 ans
Parent
commit
6b45787e81
1 fichiers modifiés avec 9 ajouts et 10 suppressions
  1. 9 10
      src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

+ 9 - 10
src/main/java/com/goafanti/common/mapper/UserIdentityMapper.xml

@@ -1197,13 +1197,13 @@ order by
 		where ui.from_uid=#{uid,jdbcType=VARCHAR}
 </select>
 <select id="appMyInterestedExpertList" resultType="com.goafanti.user.bo.MyInterestedBo">
-	select t.id ,t.uid,u.identify_name as name,t.work_unit as workUnit,u.introduction,
+	select t.uid as id,u.nickname as name,t.work_unit as workUnit,u.introduction,
     t.professional_title as professionalTitle,u.head_portrait_url as imgUrl,
     if(isnull(a.count),0,a.count) as interestCount 
-	from user_identity t left JOIN `user` u on t.uid = u.id
-	left join user_interest ui on ui.to_uid=u.id
+	from user_interest ui left JOIN `user` u on ui.to_uid = u.id
+	left join user_identity t on ui.to_uid=t.uid
 	left join (select to_uid,count(*) as count from user_interest 
-		GROUP  by to_uid) a on ui.to_uid=u.id
+		GROUP  by to_uid)a on ui.to_uid=a.to_uid
 	where 1=1
 	<if test="type==0">
 	and t.expert=1 
@@ -1217,10 +1217,9 @@ order by
     </if>
 </select>
   <select id="appMyInterestedExpertCount" resultType="java.lang.Integer">
-	 	select count(0)
-		from user_identity t left JOIN user u on t.uid = u.id
-		left join user_interest ui on ui.to_uid=u.id
-		where 1=1
+	 	select count(*)from user_interest ui 
+	left join user_identity t on ui.to_uid=t.uid
+	where 1=1
 	<if test="type==0">
 	and t.expert=1 
 	</if>
@@ -1247,7 +1246,7 @@ from
 	left join( select count(*) as count, to_uid from user_interest group by to_uid) a 
 	on u.id = a.to_uid left join( select to_uid from user_interest where from_uid =#{uid,jdbcType=VARCHAR} GROUP by to_uid) b
 	on u.id = b.to_uid 
-	where u.status = 0 and u.source = 1 
+	where u.status = 0 and u.source = 0 
 	and ui.expert = 1 and ui.audit_status = 2
 	<if test="industry != null">
 	 and ui.industry= #{industry,jdbcType=VARCHAR}
@@ -1268,7 +1267,7 @@ from
   <select id="selectCustomerAuditCount" resultType="java.lang.Integer">
 	 	select count(0)from
 	`user` u left join user_identity ui on ui.uid = u.id 
-	  where u.status = 0 and u.source = 1 and ui.expert = 1 and ui.audit_status = 2
+	  where u.status = 0 and u.source = 0 and ui.expert = 1 and ui.audit_status = 2
 	  <if test="industry != null">
 		and ui.industry= #{industry,jdbcType=VARCHAR}
 	</if>