giftpack_handler.go 879 B

123456789101112131415161718192021222324252627
  1. package handler
  2. import (
  3. "bet24.com/servers/micros/activityservice/handler/giftpack"
  4. pb "bet24.com/servers/micros/activityservice/proto"
  5. "context"
  6. )
  7. func (h *activityservice) ClaimGiftPack(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
  8. rsp.Success, rsp.Data = giftpack.ClaimGiftPack(req.UserId, req.PackageId, req.TermId)
  9. return nil
  10. }
  11. func (h *activityservice) GetUserGiftPackages(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
  12. rsp.Data = giftpack.GetUserGiftPackages(req.UserId)
  13. return nil
  14. }
  15. func (h *activityservice) GetGiftPackages(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
  16. rsp.Data = giftpack.GetGiftPackages(req.UserId)
  17. return nil
  18. }
  19. func (h *activityservice) BuyGiftPackage(ctx context.Context, req *pb.Request, rsp *pb.Response) error {
  20. giftpack.BuyGiftPackage(req.UserId, req.ProductId)
  21. return nil
  22. }