李昊 4 years ago
parent
commit
66fea7de3a

+ 6 - 2
gx_api/GxPress/Service/GxPress.Service.Implement/Reply/ReplyService.Praise.cs

@@ -314,7 +314,9 @@ namespace GxPress.Service.Implement.Reply
                                 AND a.TypeValue ={AllTypeConst.Notice.GetHashCode()}
                                 AND e.IsDelete = 0
                                 AND a.CommentId = 0
-                                AND a.AnalyzeType = 1";
+                                AND a.AnalyzeType = 1
+                                 AND a.IsRead = 0
+                                ";
             count += await connection.ExecuteScalarAsync<int>(sql);
             sql = $@"  SELECT 
                                 count(1)
@@ -335,7 +337,9 @@ namespace GxPress.Service.Implement.Reply
                                         AND a.CommentId = 0
                                         AND e.UserId = b.UserId
                                         AND a.AnalyzeType = 1
-                                        AND b.UserId ={userId}";
+                                        AND b.UserId ={userId}
+                                         AND a.IsRead = 0
+                                        ";
             count += await connection.ExecuteScalarAsync<int>(sql);
             return count;
         }