Browse Source

sql改动

Jacky Wong 4 years ago
parent
commit
03861acae8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      search-models/src/main/resources/mapper/QAProblemMapper.xml

+ 1 - 1
search-models/src/main/resources/mapper/QAProblemMapper.xml

@@ -7,7 +7,7 @@
         select a.*, c.replyCount, b.ReplyerName replyerName, b.CreateTime lastReply, b.Content content
         select a.*, c.replyCount, b.ReplyerName replyerName, b.CreateTime lastReply, b.Content content
         from QAProblem a
         from QAProblem a
         LEFT JOIN (
         LEFT JOIN (
-        select a.Id, count(1) replyCount from QAProblem a left join QAReply b on a.Id = b.ProblemId where b.DoctorId > 0 and b.Level = 0 GROUP BY a.Id ) c on a.Id = c.Id
+        select a.Id, count(1) replyCount from QAProblem a left join QAReply b on a.Id = b.ProblemId where b.DoctorId > 0 and b.Level = 1 GROUP BY a.Id ) c on a.Id = c.Id
         LEFT JOIN (
         LEFT JOIN (
         select b.ProblemId, max(b.Id) id from QAReply b GROUP BY b.ProblemId) d on a.Id = d.ProblemId
         select b.ProblemId, max(b.Id) id from QAReply b GROUP BY b.ProblemId) d on a.Id = d.ProblemId
         LEFT JOIN QAReply b on a.Id = b.ProblemId and b.Id = d.id
         LEFT JOIN QAReply b on a.Id = b.ProblemId and b.Id = d.id