package data_manage import "github.com/rdlucklib/rdluck_tools/orm" type ManualSysUser struct { ItemId int `description:"部门/组/用户 id"` ItemName string `description:"部门/组/用户 名称"` Children []*ManualSysUser } type ManualClassifyEdbInfoCount struct { ClassifyId int Total int } func GetManualClassifyEdbInfoCount() (items []*ManualClassifyEdbInfoCount, err error) { sql := ` SELECT a.classify_id,COUNT(1) AS total FROM edbdata_classify AS a INNER JOIN edbinfo AS b ON a.classify_id=b.classify_id WHERE a.is_show=1 GROUP BY a.classify_id ` o := orm.NewOrm() o.Using("edb") _, err = o.Raw(sql).QueryRows(&items) return }