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.

emoticon_service.go 378 B

123456789101112131415161718
  1. package service
  2. import (
  3. "gim/internal/business/comm/db"
  4. "gim/pkg/pb"
  5. )
  6. func EmoticonList(masterId string) ([]*pb.Emoticon, error) {
  7. emoticons, err := db.DbEmoticon.EmoticonFind(masterId)
  8. if err != nil {
  9. return nil, err
  10. }
  11. pbEmoticons := make([]*pb.Emoticon, len(*emoticons))
  12. for i, v := range *emoticons {
  13. pbEmoticons[i] = v.ToProto()
  14. }
  15. return pbEmoticons, nil
  16. }