Procházet zdrojové kódy

顾问列表BUG修复

anderx před 7 roky
rodič
revize
4c4b6308d3

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

@@ -1290,7 +1290,7 @@ select a.id as uid,a.nickname as username,a.head_portrait_url as personPortraitU
 		ifnull(c.count,0) as countInterest,b.expert,ifnull(x.a,0) as favorable,ifnull(x.b,0) as general,
 		ifnull(x.c,0) as inferior,ifnull(x.d,0) as commentCount,ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate,
 		if(isnull(d.to_uid),0,1) as interested
-		from `user` a left join user_identity b on a.id=b.uid left join (select b.commodity_id as uid,
+		from `user` a left join user_identity b on a.id=b.uid left join (select a.commodity_id as uid,
 			sum(case when a.star > 3 then 1 else 0 end) as a,
 			sum(case when a.star=3 then 1 else 0 end) as b,
 			sum(case when a.star < 3 then 1 else 0 end) as c,count(*) as d
@@ -1309,7 +1309,7 @@ where a.id=#{id,jdbcType=VARCHAR}
 	ifnull( x.d, 0 ) as commentCount, ifnull( cast(x.a*100 / x.d as decimal(18, 2)), 100 ) as favorableRate
 from
 	`user` u left join user_identity ui on ui.uid = u.id 
-	left join(select b.commodity_id as uid,
+	left join(select a.commodity_id as uid,
 			sum(case when a.star > 3 then 1 else 0 end) as a,
 			sum(case when a.star=3 then 1 else 0 end) as b,
 			sum(case when a.star < 3 then 1 else 0 end) as c,count(*) as d