golang-im聊天
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 470 B

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