Kaynağa Gözat

Merge branch 'debug' of http://8.136.199.33:3000/eta_server/eta_api into debug

kobe6258 3 hafta önce
ebeveyn
işleme
9bc397ee9e

+ 2 - 2
services/ppt/ppt_english_group.go

@@ -584,7 +584,7 @@ func MoveGroupPptEnglish(groupId, groupPptId, prevGroupPptId, nextGroupPptId int
 			err = errors.New("获取最小排序失败:" + tmpErr.Error())
 			return
 		}
-		pptSort, _ = decimal.NewFromFloat(maxSort).Add(decimal.NewFromInt(1)).Float64()
+		pptSort, _ = decimal.NewFromFloat(maxSort).Sub(decimal.NewFromInt(1)).Float64()
 	} else if nextGroupPpt != nil && nextGroupPpt.PptId > 0 {
 		// 最上面
 		minSort, tmpErr := ppt_english.GetMaxSortByEnglishGroupId(nextGroupPpt.GroupId)
@@ -592,7 +592,7 @@ func MoveGroupPptEnglish(groupId, groupPptId, prevGroupPptId, nextGroupPptId int
 			err = errors.New("获取最小排序失败:" + tmpErr.Error())
 			return
 		}
-		pptSort, _ = decimal.NewFromFloat(minSort).Sub(decimal.NewFromInt(1)).Float64()
+		pptSort, _ = decimal.NewFromFloat(minSort).Add(decimal.NewFromInt(1)).Float64()
 	}
 
 	groupPpt.PptSort = pptSort

+ 2 - 2
services/ppt/ppt_group.go

@@ -834,7 +834,7 @@ func MoveGroupPpt(groupId, groupPptId, prevGroupPptId, nextGroupPptId int64, adm
 			err = errors.New("获取最小排序失败:" + tmpErr.Error())
 			return
 		}
-		pptSort, _ = decimal.NewFromFloat(maxSort).Add(decimal.NewFromInt(1)).Float64()
+		pptSort, _ = decimal.NewFromFloat(maxSort).Sub(decimal.NewFromInt(1)).Float64()
 	} else if nextGroupPpt != nil && nextGroupPpt.PptId > 0 {
 		// 最上面
 		minSort, tmpErr := models.GetMaxSortByGroupId(nextGroupPpt.GroupId)
@@ -842,7 +842,7 @@ func MoveGroupPpt(groupId, groupPptId, prevGroupPptId, nextGroupPptId int64, adm
 			err = errors.New("获取最小排序失败:" + tmpErr.Error())
 			return
 		}
-		pptSort, _ = decimal.NewFromFloat(minSort).Sub(decimal.NewFromInt(1)).Float64()
+		pptSort, _ = decimal.NewFromFloat(minSort).Add(decimal.NewFromInt(1)).Float64()
 	}
 
 	groupPpt.PptSort = pptSort