李昊 4 年之前
父节点
当前提交
936003b4a4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      gx_api/GxPress/Repository/GxPress.Repository.Implement/Note/NoteRepository.cs

+ 2 - 2
gx_api/GxPress/Repository/GxPress.Repository.Implement/Note/NoteRepository.cs

@@ -657,7 +657,7 @@ namespace GxPress.Repository.Implement.Note
                                             ,b.Name,b.AvatarUrl
                             FROM
                                 tede_note a inner join tede_user b on a.UserId=b.Id
-                            WHERE
+                            WHERE a.IsDelete=0 and 
                                 a.UserId = {request.UserId} {sqlValue}
                             ORDER BY a.CreatedDate DESC  limit {(request.Page - 1) * request.PerPage},{request.PerPage}";
             var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypestr, DatabaseType.MySql);
@@ -676,7 +676,7 @@ namespace GxPress.Repository.Implement.Note
             sql = $@"SELECT count(1)
                             FROM
                                 tede_note a inner join tede_user b on a.UserId=b.Id
-                            WHERE
+                            WHERE a.IsDelete=0 and 
                                 a.UserId = {request.UserId} {sqlValue}";
             result.Total = await connection.ExecuteScalarAsync<int>(sql);
             return result;