李昊 4 years ago
parent
commit
9235b24751

+ 1 - 1
gx_api/GxPress/Repository/GxPress.Repository.Implement/Collection/CollectionRepository.cs

@@ -291,7 +291,7 @@ namespace GxPress.Repository.Implement.Collection
                             tede_collection a
                                 INNER JOIN
                             tede_middle b ON a.Id = b.MiddleId AND b.FolderType ={collectionContsValue} {sqlStr}
-                                AND a.UserId ={request.UserId} and b.IsDelete=0 order by a.IsTop desc ,a.CreatedDate desc limit {(request.Page - 1) * request.PerPage},{request.PerPage} ";
+                                AND a.UserId ={request.UserId} and b.IsDelete=0 order by a.IsTop desc ,a.LastModifiedDate desc limit {(request.Page - 1) * request.PerPage},{request.PerPage} ";
             var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypestr, DatabaseType.MySql);
             var database = new Database(databaseType, _connectionString);
             var connection = database.GetConnection();

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

@@ -702,7 +702,7 @@ namespace GxPress.Repository.Implement.Note
                                 tede_user b ON a.UserId = b.Id inner join tede_middle c on c.MiddleId=a.Id
                             WHERE
                                 a.IsDelete = 0 AND a.UserId = {request.UserId}  and c.FolderType={noteConstValue} {sqlValue}
-                            ORDER BY a.IsTop desc ,a.CreatedDate DESC
+                            ORDER BY a.IsTop desc ,a.LastModifiedDate DESC
                             limit {(request.Page - 1) * request.PerPage},{request.PerPage}";
             var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypestr, DatabaseType.MySql);
             var database = new Database(databaseType, _connectionString);

+ 4 - 0
gx_api/GxPress/Service/GxPress.Service.Implement/UserMiddle/UserMiddleService.cs

@@ -170,6 +170,10 @@ namespace GxPress.Service.Implement.UserMiddle
                 //获取用户
                 users.AddRange(await _userRepoitory.GetAllAsync(Q.WhereIn(nameof(Entity.User.Id), userIds)));
             users = users.Distinct().ToList();
+            foreach (var item in users)
+            {
+                item.AvatarUrl = Common.Tools.StringUtils.AddDomainMin(item.AvatarUrl);
+            }
             return users;
         }
         /// <summary>