pendant.go 557 B

123456789101112131415161718192021
  1. package server
  2. import (
  3. "go-common/app/service/main/usersuit/model"
  4. "go-common/library/net/rpc/context"
  5. )
  6. // Equipment obtain Equipment by mid .
  7. func (r *RPC) Equipment(c context.Context, mid int64, res *model.PendantEquip) (err error) {
  8. var pe *model.PendantEquip
  9. if pe, err = r.s.Equipment(c, mid); err == nil && pe != nil {
  10. *res = *pe
  11. }
  12. return
  13. }
  14. // Equipments obtain equipments by mids .
  15. func (r *RPC) Equipments(c context.Context, mids []int64, res *map[int64]*model.PendantEquip) (err error) {
  16. *res, err = r.s.Equipments(c, mids)
  17. return
  18. }