edb_classify.go 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package data_manage
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type EdbClassify struct {
  7. ClassifyID int64 `orm:"column(classify_id);pk"`
  8. ClassifyType uint32
  9. ClassifyName string
  10. ParentID int64
  11. HasData int32
  12. CreateTime time.Time
  13. ModifyTime time.Time
  14. SysUserID int64
  15. SysUserRealName string
  16. Level int64
  17. UniqueCode string
  18. Sort uint32
  19. RootID int64
  20. LastModifyUserID uint32
  21. LastModifyUserName string
  22. }
  23. // GetAllEdbClassifyListByCondition
  24. // @Description: 获取分类列表
  25. // @author: Roc
  26. // @datetime 2024-02-29 10:55:38
  27. // @param condition string
  28. // @param pars []interface{}
  29. // @return item []*EdbInfoUpdateLog
  30. // @return err error
  31. func GetAllEdbClassifyListByCondition(condition string, pars []interface{}) (item []*EdbClassify, err error) {
  32. o := orm.NewOrmUsingDB("data")
  33. sql := ` SELECT * FROM edb_classify WHERE 1=1 `
  34. if condition != "" {
  35. sql += condition
  36. }
  37. sql += `ORDER BY classify_id ASC `
  38. _, err = o.Raw(sql, pars).QueryRows(&item)
  39. return
  40. }