zqbao hai 9 meses
pai
achega
9d29845475
Modificáronse 1 ficheiros con 1 adicións e 8 borrados
  1. 1 8
      models/sys_department.go

+ 1 - 8
models/sys_department.go

@@ -129,7 +129,7 @@ func GetSysDepartments() (items []*SysDepartment, err error) {
 
 func GetSysDepartmentList() (items []*SysDepartmentList, err error) {
 	o := orm.NewOrm()
-	sql := `SELECT * FROM sys_department OEDER BY sort DESC`
+	sql := `SELECT * FROM sys_department ORDER BY sort DESC`
 	_, err = o.Raw(sql).QueryRows(&items)
 	return
 }
@@ -162,13 +162,6 @@ func GetSysDepartmentByName(sysDepartmentName string) (item *SysDepartment, err
 	return
 }
 
-func GetSysDepartmentListByLevel(level int) (items []*SysDepartmentList, err error) {
-	o := orm.NewOrm()
-	sql := `SELECT * FROM sys_department WHERE level=? ORDER BY sort`
-	_, err = o.Raw(sql, level).QueryRows(&items)
-	return
-}
-
 func GetSysDepartmentListByParentId(parentId int) (item SysDepartmentList, err error) {
 	o := orm.NewOrm()
 	sql := `SELECT * FROM sys_department WHERE sys_department_id=? `