lotteryreceivelogic.go 900 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package logic
  2. import (
  3. "app.yhyue.com/moapp/jyMarketing/service"
  4. "context"
  5. "app.yhyue.com/moapp/jyMarketing/rpc/activity"
  6. "app.yhyue.com/moapp/jyMarketing/rpc/internal/svc"
  7. "github.com/tal-tech/go-zero/core/logx"
  8. )
  9. var (
  10. activityService = &service.ActivityService{}
  11. )
  12. type LotteryReceiveLogic struct {
  13. ctx context.Context
  14. svcCtx *svc.ServiceContext
  15. logx.Logger
  16. }
  17. func NewLotteryReceiveLogic(ctx context.Context, svcCtx *svc.ServiceContext) *LotteryReceiveLogic {
  18. return &LotteryReceiveLogic{
  19. ctx: ctx,
  20. svcCtx: svcCtx,
  21. Logger: logx.WithContext(ctx),
  22. }
  23. }
  24. // 奖券领取
  25. func (l *LotteryReceiveLogic) LotteryReceive(in *activity.LotteryOperation) (*activity.Response, error) {
  26. // todo: add your logic here and delete this line
  27. result := &activity.Response{}
  28. code, msg := activityService.LotteryReceive(in)
  29. result.Code =code
  30. result.Message = msg
  31. return result, nil
  32. }