func (this *ReqJesgooModule) convert_resp_ad(inad *context.AdInfo, bsad *ui2bs.Ad, adtype AdType) { inad.AdSrc = context.AdSrc_JESGOO switch bsad.Adtype { case ui2bs.AdType_TEXT: inad.AdType = context.TEXT case ui2bs.AdType_IMAGE: inad.AdType = context.IMAGE case ui2bs.AdType_HTML: inad.AdType = context.HTML case ui2bs.AdType_VIDEO: inad.AdType = context.VIDEO case ui2bs.AdType_TEXT_ICON: inad.AdType = context.TEXT_ICON } switch bsad.InteractionType { case ui2bs.Interaction_SURFING: inad.InteractionType = context.SURFING case ui2bs.Interaction_DOWNLOAD: inad.InteractionType = context.DOWNLOAD case ui2bs.Interaction_DIALING: inad.InteractionType = context.DIALING case ui2bs.Interaction_MESSAGE: inad.InteractionType = context.MESSAGE case ui2bs.Interaction_MAIL: inad.InteractionType = context.MAIL } switch adtype { case Banner: inad.AdSlotType = context.AdSlotType_BANNER case Initlization: inad.AdSlotType = context.AdSlotType_INITIALIZATION case Insert: inad.AdSlotType = context.AdSlotType_INSERT case OfferWall: inad.AdSlotType = context.AdSlotType_OFFERWALL case Recommed: inad.AdSlotType = context.AdSlotType_RECOMMEND default: inad.AdSlotType = context.AdSlotType_BANNER } inad.Adid = bsad.Adid inad.Groupid = bsad.Groupid inad.Planid = bsad.Planid inad.Userid = bsad.Userid inad.Bid = bsad.Bid inad.Price = 0 inad.Ctr = 0 inad.Cpm = 0 }