package data_manage import ( "eta/eta_task/global" "eta/eta_task/utils" "time" ) type EdbClassify struct { ClassifyID int64 `gorm:"column:classify_id;primaryKey;autoIncrement"` ClassifyType uint32 ClassifyName string ParentID int64 `gorm:"column:parent_id"` HasData int32 CreateTime time.Time ModifyTime time.Time SysUserID int64 `gorm:"column:sys_user_id"` SysUserRealName string Level int64 UniqueCode string Sort uint32 RootID int64 `gorm:"column:root_id"` LastModifyUserID uint32 `gorm:"column:last_modify_user_id"` 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 := global.DbMap[utils.DbNameIndex] sql := ` SELECT * FROM edb_classify WHERE 1=1 ` if condition != "" { sql += condition } sql += `ORDER BY classify_id ASC ` err = o.Raw(sql, pars...).Find(&item).Error return }