advert.go 392 B

1234567891011121314151617
  1. package service
  2. import (
  3. "context"
  4. "go-common/app/interface/main/dm2/model"
  5. )
  6. // DMAdvert dm advert.
  7. func (s *Service) DMAdvert(c context.Context, arg *model.ADReq) (res *model.ADResp, err error) {
  8. ad, err := s.dao.DMAdvert(c, arg.Aid, arg.Oid, arg.Mid, arg.Build, arg.Buvid, arg.MobiApp, arg.ADExtra)
  9. if err != nil || ad == nil {
  10. return
  11. }
  12. res = ad.Convert(arg.ClientIP)
  13. return
  14. }