package data_manage import ( "github.com/beego/beego/v2/client/orm" "time" ) type EdbClassify struct { ClassifyID int64 `orm:"column(classify_id);pk"` ClassifyType uint32 ClassifyName string ParentID int64 HasData int32 CreateTime time.Time ModifyTime time.Time SysUserID int64 SysUserRealName string Level int64 UniqueCode string Sort uint32 RootID int64 LastModifyUserID uint32 LastModifyUserName string } // GetAllEdbClassifyListByCondition // @Description: 获取分类列表 // @author: Roc // @datetime 2024-02-29 10:55:38 // @param condition string // @param pars []interface{} // @return item []*EdbInfoUpdateLog // @return err error func GetAllEdbClassifyListByCondition(condition string, pars []interface{}) (item []*EdbClassify, err error) { o := orm.NewOrmUsingDB("data") sql := ` SELECT * FROM edb_classify WHERE 1=1 ` if condition != "" { sql += condition } sql += `ORDER BY classify_id ASC ` _, err = o.Raw(sql, pars).QueryRows(&item) return }