李昊 4 rokov pred
rodič
commit
9eb396e104

+ 1 - 1
gx_api/GxPress/Repository/GxPress.Repository.Implement/MiddleRepository.cs

@@ -162,7 +162,7 @@ namespace GxPress.Repository.Implement
                     .Where(nameof(Middle.Id), request.MiddleIdFirst));
                 int sort = middleSecond.Sort;
                 var sql =
-                    $"update tede_middle set Sort=Sort+1 where UserId={middleFirst.UserId} and FolderType={middleFirst.FolderType} and Sort<={sort} and Id not in({middleFirst.Id}) and id>0";
+                    $"update tede_middle set Sort=Sort+1 where UserId={middleFirst.UserId} and FolderType={middleFirst.FolderType} and Sort>={sort} and Id not in({middleFirst.Id}) and id>0";
                 return await connection.ExecuteAsync(sql) > 0;
             }
         }