airobot/busi/friend/friend_recommend.go
2022-12-09 18:41:12 +08:00

33 lines
534 B
Go

package friend
import (
"time"
"google.golang.org/protobuf/proto"
"legu.airobot/lib"
"legu.airobot/pb"
)
var _ lib.ICaller = (*FriendRecommend)(nil)
// 好友推荐
type FriendRecommend struct {
lib.Action
Desc string
}
func (a *FriendRecommend) BuildReq(head *pb.UserMessage) lib.ActionReq {
id := time.Now().UnixNano()
var req []byte
if lib.ProtoMarshal(&pb.FriendRandlistReq{}, head) {
data, err := proto.Marshal(head)
if err != nil {
panic(err)
}
req = data
}
return lib.ActionReq{ID: id, Req: req}
}