customer_comment.go 386 B

123456789101112131415161718
  1. package models
  2. import "github.com/beego/beego/v2/client/orm"
  3. type CustomerComment struct {
  4. Id int
  5. HeadImgUrl string
  6. CustomerName string
  7. CompanyName string
  8. Comment string
  9. }
  10. func GetCustomerComment() (item []*CustomerComment, err error) {
  11. sql := ` SELECT * FROM customer_comment `
  12. o := orm.NewOrmUsingDB("rddp")
  13. _, err = o.Raw(sql).QueryRows(&item)
  14. return
  15. }