|
@@ -578,14 +578,16 @@ func MoveGroupPptEnglish(groupId, groupPptId, prevGroupPptId, nextGroupPptId int
|
|
|
if prevGroupPpt != nil && prevGroupPpt.PptId > 0 && nextGroupPpt != nil && nextGroupPpt.PptId > 0 { // 两个之间
|
|
|
pptSort, _ = decimal.NewFromFloat(prevGroupPpt.PptSort).Add(decimal.NewFromFloat(nextGroupPpt.PptSort)).Div(decimal.NewFromInt(2)).Float64()
|
|
|
} else if prevGroupPpt != nil && prevGroupPpt.PptId > 0 {
|
|
|
- maxSort, tmpErr := ppt_english.GetMaxSortByEnglishGroupId(prevGroupPpt.GroupId)
|
|
|
+ // 最下面
|
|
|
+ maxSort, tmpErr := ppt_english.GetMinSortByEnglishGroupId(prevGroupPpt.GroupId)
|
|
|
if tmpErr != nil {
|
|
|
err = errors.New("获取最小排序失败:" + tmpErr.Error())
|
|
|
return
|
|
|
}
|
|
|
pptSort, _ = decimal.NewFromFloat(maxSort).Add(decimal.NewFromInt(1)).Float64()
|
|
|
} else if nextGroupPpt != nil && nextGroupPpt.PptId > 0 {
|
|
|
- minSort, tmpErr := ppt_english.GetMinSortByEnglishGroupId(nextGroupPpt.GroupId)
|
|
|
+ // 最上面
|
|
|
+ minSort, tmpErr := ppt_english.GetMaxSortByEnglishGroupId(nextGroupPpt.GroupId)
|
|
|
if tmpErr != nil {
|
|
|
err = errors.New("获取最小排序失败:" + tmpErr.Error())
|
|
|
return
|