package taobao import ( "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/taobao/topsdk" "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/taobao/topsdk/defaultability" "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/taobao/topsdk/defaultability/domain" "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/taobao/topsdk/defaultability/request" "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/taobao/topsdk/defaultability/response" zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils" ) const ( ELM_URL = "https://eco.taobao.com/router/rest" ) func ElemePromotionOfficialactivityGet(ak, sk string, args map[string]interface{}) (*response.AlibabaAlscUnionElemePromotionOfficialactivityGetResponse, error) { client := topsdk.NewDefaultTopClient(ak, sk, ELM_URL, 20000, 20000) ability := defaultability.NewDefaultability(&client) alibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest := domain.AlibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest{} alibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest.SetPid(zhios_third_party_utils.AnyToString(args["pid"])) alibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest.SetActivityId(zhios_third_party_utils.AnyToString(args["activity_id"])) alibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest.SetSid(zhios_third_party_utils.AnyToString(args["sid"])) alibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest.SetIncludeWxImg(zhios_third_party_utils.AnyToBool(args["include_wx_img"])) alibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest.SetIncludeQrCode(zhios_third_party_utils.AnyToBool(args["include_qrcode"])) req := request.AlibabaAlscUnionElemePromotionOfficialactivityGetRequest{} req.SetQueryRequest(alibabaAlscUnionElemePromotionOfficialactivityGetActivityRequest) resp, err := ability.AlibabaAlscUnionElemePromotionOfficialactivityGet(&req) if err != nil { return nil, err } return resp, nil } func AlibabaAlscUnionKbcpxPositiveOrder(ak, sk string, args map[string]interface{}) (*response.AlibabaAlscUnionKbcpxPositiveOrderGetResponse, error) { client := topsdk.NewDefaultTopClient(ak, sk, ELM_URL, 20000, 20000) ability := defaultability.NewDefaultability(&client) req := request.AlibabaAlscUnionKbcpxPositiveOrderGetRequest{} req.SetDateType(zhios_third_party_utils.AnyToInt64(args["date_type"])) //时间维度,1-付款时间 2-创建时间 3-结算时间 4-更新时间 if args["settle_state"] != "" { req.SetSettleState(zhios_third_party_utils.AnyToInt64(args["settle_state"])) } //结算状态,1-已结算 2-未结算 不传-全部状态 req.SetEndDate(zhios_third_party_utils.AnyToString(args["end_date"])) req.SetBizUnit(zhios_third_party_utils.AnyToInt64(args["biz_unit"])) // 1-CPA 2-CPS req.SetPageSize(zhios_third_party_utils.AnyToInt64(args["page_size"])) req.SetPageNumber(zhios_third_party_utils.AnyToInt64(args["page"])) req.SetStartDate(zhios_third_party_utils.AnyToString(args["start_date"])) if args["order_state"] != "" { req.SetOrderState(zhios_third_party_utils.AnyToInt64(args["order_state"])) } //订单状态,0-已失效 1-已下单 2-已付款 4-已收货 不传-全部状态 if args["flow_type"] != "" { req.SetFlowType(zhios_third_party_utils.AnyToString(args["flow_type"])) } //场景值,支持多场景(英文逗号分隔)查询7卡券订单,8卡券核销订单,10-媒体出资CPS红包,11-媒体出资霸王餐加码红包 req.SetPid(zhios_third_party_utils.AnyToString(args["pid"])) if args["order_id"] != "" { req.SetOrderId(zhios_third_party_utils.AnyToString(args["order_id"])) } resp, err := ability.AlibabaAlscUnionKbcpxPositiveOrderGet(&req) if err != nil { return nil, err } return resp, nil } func AlibabaAlscUnionKbcpxRefundOrder(ak, sk string, args map[string]interface{}) (*response.AlibabaAlscUnionKbcpxRefundOrderGetResponse, error) { client := topsdk.NewDefaultTopClient(ak, sk, ELM_URL, 20000, 20000) ability := defaultability.NewDefaultability(&client) req := request.AlibabaAlscUnionKbcpxRefundOrderGetRequest{} req.SetDateType(zhios_third_party_utils.AnyToInt64(args["date_type"])) //时间维度,1-付款时间 2-创建时间 3-结算时间 4-更新时间 req.SetEndDate(zhios_third_party_utils.AnyToString(args["end_date"])) req.SetBizUnit(zhios_third_party_utils.AnyToInt64(args["biz_unit"])) // 1-CPA 2-CPS req.SetPageSize(zhios_third_party_utils.AnyToInt64(args["page_size"])) req.SetPageNumber(zhios_third_party_utils.AnyToInt64(args["page"])) req.SetStartDate(zhios_third_party_utils.AnyToString(args["start_date"])) if args["flow_type"] != "" { req.SetFlowType(zhios_third_party_utils.AnyToString(args["flow_type"])) } //场景值,支持多场景(英文逗号分隔)查询7卡券订单,8卡券核销订单,10-媒体出资CPS红包,11-媒体出资霸王餐加码红包 req.SetPid(zhios_third_party_utils.AnyToString(args["pid"])) if args["order_id"] != "" { req.SetOrderId(zhios_third_party_utils.AnyToString(args["order_id"])) } resp, err := ability.AlibabaAlscUnionKbcpxRefundOrderGet(&req) if err != nil { return nil, err } return resp, nil }