浏览代码

git commit -a -m '后:组织树排序'

dubch 5 年之前
父节点
当前提交
c9f782bf49
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/dashoo.cn/backend/api/controllers/casbin/organize.go

+ 2 - 2
src/dashoo.cn/backend/api/controllers/casbin/organize.go

@@ -62,7 +62,7 @@ func (this *OrganizesController) List() {
 		where = where + " and Id in ( " + ids + " )"
 	}
 	list := make([]organize.Base_Organize, 0)
-	total := svc.GetPagingEntitiesWithSortCode(page.CurrentPage, page.Size, "ParentId, CreateOn desc", &list, where)
+	total := svc.GetPagingEntitiesWithSortCode(page.CurrentPage, page.Size, "ParentId, Id asc", &list, where)
 	var datainfo DataInfo
 	datainfo.Items = list
 	datainfo.CurrentItemCount = total
@@ -130,7 +130,7 @@ func (this *OrganizesController) Listbandparentname() {
 		ids := svc.GetAllChildByTopId(parentid, this.User.Id)
 		where = where + " and a.Id in ( " + ids + " )"
 	}
-	total, list := svc.GetListbandparentname(page.CurrentPage, page.Size, "a.ParentId, a.CreateOn desc", where)
+	total, list := svc.GetListbandparentname(page.CurrentPage, page.Size, "a.ParentId, a.Id asc", where)
 	var datainfo DataInfo
 	datainfo.Items = list
 	datainfo.CurrentItemCount = total