activityuselogic.go 781 B

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