package elm 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/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 = "http://gw.api.taobao.com/router/rest" ) func ElemePromotionOrder(ak, sk string, args map[string]string) (*response.AlibabaAlscUnionKbcpxPositiveOrderGetResponse, error) { client := topsdk.NewDefaultTopClient(ak, sk, ELM_URL, 20000, 20000) ability := defaultability.NewDefaultability(&client) AlibabaAlscUnionKbcpxPositiveOrderGetRequest := request.AlibabaAlscUnionKbcpxPositiveOrderGetRequest{} AlibabaAlscUnionKbcpxPositiveOrderGetRequest.SetBizUnit(2) AlibabaAlscUnionKbcpxPositiveOrderGetRequest.SetDateType(4) //时间维度,1-付款时间 2-创建时间 3-结算时间 4-更新时间 AlibabaAlscUnionKbcpxPositiveOrderGetRequest.SetEndDate(args["end_time"]) AlibabaAlscUnionKbcpxPositiveOrderGetRequest.SetPageNumber(zhios_third_party_utils.StrToInt64(args["p"])) AlibabaAlscUnionKbcpxPositiveOrderGetRequest.SetPageSize(zhios_third_party_utils.StrToInt64(args["size"])) AlibabaAlscUnionKbcpxPositiveOrderGetRequest.SetStartDate(args["start_time"]) resp, err := ability.AlibabaAlscUnionKbcpxPositiveOrderGet(&AlibabaAlscUnionKbcpxPositiveOrderGetRequest) if err != nil { return nil, err } return resp, nil }