lihao 4 yıl önce
ebeveyn
işleme
c7bacc36a9

+ 5 - 5
gx_api/GxPress/Service/GxPress.Service.Implement/Middle/MiddleService.cs

@@ -445,10 +445,10 @@ namespace GxPress.Service.Implement.Middle
                         //判断是否文件夹
                         if (middle.AttributeValue == 2)
                         {
-                             query = Q.NewQuery();
-                             query.Set(nameof(Entity.Middle.Middle.ParentId), 0);
-                             query.Where(nameof(Entity.Middle.Middle.ParentId), middle.Id);
-                             query.Where(nameof(Entity.Middle.Middle.FolderType), AllTypeConst.Wechat.GetHashCode());
+                            query = Q.NewQuery();
+                            query.Set(nameof(Entity.Middle.Middle.ParentId), 0);
+                            query.Where(nameof(Entity.Middle.Middle.ParentId), middle.Id);
+                            query.Where(nameof(Entity.Middle.Middle.FolderType), AllTypeConst.Wechat.GetHashCode());
                             await _middleRepository.UpdateAsync(query);
                         }
                     }
@@ -877,7 +877,7 @@ namespace GxPress.Service.Implement.Middle
                                     AND RoleId IN (1 , 3)
                                     AND IsDelete = 0
                                     AND ParentId ={request.ParentId}
-                            ORDER BY IsSystemDefault DESC,AttributeValue desc , IsTop DESC , Sort DESC , CreatedDate DESC";
+                            ORDER BY IsSystemDefault DESC,AttributeValue desc , IsTop DESC ,  {nameof(Entity.Middle.Middle.LastModifiedDate)} DESC,Sort DESC";
             var database = new Database(DatabaseType.MySql, ConfigHelper.GetValue("Database:ConnectionString"));
             var connection = database.GetConnection();
             var middles = await connection.QueryAsync<Entity.Middle.Middle>(sql);