advertisingexposurelogic.go 928 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. adService = &service.AdvertisingService{}
  11. )
  12. type AdvertisingExposureLogic struct {
  13. ctx context.Context
  14. svcCtx *svc.ServiceContext
  15. logx.Logger
  16. }
  17. func NewAdvertisingExposureLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AdvertisingExposureLogic {
  18. return &AdvertisingExposureLogic{
  19. ctx: ctx,
  20. svcCtx: svcCtx,
  21. Logger: logx.WithContext(ctx),
  22. }
  23. }
  24. // 广告联盟-曝光
  25. func (l *AdvertisingExposureLogic) AdvertisingExposure(in *activity.AdvertisingReq) (*activity.Response, error) {
  26. // todo: add your logic here and delete this line
  27. result := &activity.Response{}
  28. code, msg := adService.InsertAdExposure(in)
  29. result.Code =code
  30. result.Message = msg
  31. return result, nil
  32. }