|
@@ -1428,7 +1428,7 @@ func (this *SandboxController) ChartClassifyMove() {
|
|
|
}
|
|
|
|
|
|
//如果该分类下存在其他分类,且第一个其他分类的排序等于0,那么需要调整排序
|
|
|
- if firstClassify != nil && firstClassify.Sort == 0 {
|
|
|
+ if firstClassify != nil && firstClassify.SandboxClassifyId > 0 && firstClassify.Sort == 0 {
|
|
|
updateSortStr := ` sort + 1 `
|
|
|
_ = sandbox.UpdateSandboxSortByClassifyId(firstClassify.SandboxClassifyId, 0, firstClassify.SandboxId-1, updateSortStr)
|
|
|
}
|
|
@@ -1617,7 +1617,7 @@ func (this *SandboxController) ChartClassifyMove() {
|
|
|
}
|
|
|
|
|
|
//如果该分类下存在其他分类,且第一个其他分类的排序等于0,那么需要调整排序
|
|
|
- if firstClassify != nil && firstClassify.Sort == 0 {
|
|
|
+ if firstClassify != nil && firstClassify.SandboxClassifyId > 0 && firstClassify.Sort == 0 {
|
|
|
updateSortStr := ` sort + 1 `
|
|
|
_ = sandbox.UpdateSandboxClassifySortByParentId(firstClassify.ParentId, firstClassify.SandboxClassifyId-1, 0, updateSortStr)
|
|
|
}
|
|
@@ -1722,7 +1722,7 @@ func (this *SandboxController) ListV2() {
|
|
|
childIds := make([]int, 0)
|
|
|
sandboxService.GetSandBoxClassifyChildIds(sandboxClassifyId, classsifyMap, &childIds)
|
|
|
if len(childIds) > 0 {
|
|
|
- ids := utils.IntArr2joinString(childIds,",")
|
|
|
+ ids := utils.IntArr2joinString(childIds, ",")
|
|
|
condition += " AND sandbox_classify_id IN(" + ids + ") "
|
|
|
} else {
|
|
|
condition += " AND sandbox_classify_id = ? "
|
|
@@ -1750,11 +1750,10 @@ func (this *SandboxController) ListV2() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
for i, v := range list {
|
|
|
parentIds := make([]int, 0)
|
|
|
sandboxService.GetSandBoxParentIds(v.SandboxClassifyId, classsifyMap, &parentIds)
|
|
|
- ids := utils.IntArr2joinString(parentIds,",")
|
|
|
+ ids := utils.IntArr2joinString(parentIds, ",")
|
|
|
list[i].ParentIds = ids
|
|
|
}
|
|
|
|
|
@@ -2162,7 +2161,7 @@ func (this *SandboxController) GetSandboxDetail() {
|
|
|
// }
|
|
|
//
|
|
|
// //如果该分类下存在其他分类,且第一个其他分类的排序等于0,那么需要调整排序
|
|
|
-// if firstClassify != nil && firstClassify.Sort == 0 {
|
|
|
+// if firstClassify != nil && firstClassify.SandboxClassifyId > 0 && firstClassify.Sort == 0 {
|
|
|
// updateSortStr := ` sort + 1 `
|
|
|
// _ = sandbox.UpdateSandboxSortByClassifyId(firstClassify.SandboxClassifyId, 0, firstClassify.SandboxId-1, updateSortStr)
|
|
|
// }
|
|
@@ -2303,7 +2302,7 @@ func (this *SandboxController) GetSandboxDetail() {
|
|
|
// }
|
|
|
//
|
|
|
// //如果该分类下存在其他分类,且第一个其他分类的排序等于0,那么需要调整排序
|
|
|
-// if firstClassify != nil && firstClassify.Sort == 0 {
|
|
|
+// if firstClassify != nil && firstClassify.SandboxClassifyId > 0 && firstClassify.Sort == 0 {
|
|
|
// updateSortStr := ` sort + 1 `
|
|
|
// _ = sandbox.UpdateSandboxClassifySortByParentId(firstClassify.ParentId, firstClassify.SandboxClassifyId-1, 0, updateSortStr)
|
|
|
// }
|