You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

db_emoticon.go 434 B

3 days ago
2 days ago
3 days ago
3 days ago
3 days ago
3 days ago
3 days ago
1234567891011121314151617181920
  1. package db
  2. import (
  3. "egg-im/internal/business/comm/db/model"
  4. "egg-im/pkg/db"
  5. "egg-im/pkg/gerrors"
  6. )
  7. type dbEmoticon struct{}
  8. var DbEmoticon = new(dbEmoticon)
  9. // EmoticonFind 获取记录
  10. func (*dbEmoticon) EmoticonFind() (*[]model.Emoticon, error) {
  11. var list []model.Emoticon
  12. if err := db.DB.Where("`state` = 1").Order("sort desc").Find(&list).Error; err != nil {
  13. return nil, gerrors.WrapError(err)
  14. }
  15. return &list, nil
  16. }