第三方api接口
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

32 righe
1.6 KiB

  1. package elm
  2. import (
  3. "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/taobao/topsdk"
  4. "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/taobao/topsdk/defaultability"
  5. "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/taobao/topsdk/defaultability/request"
  6. "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/taobao/topsdk/defaultability/response"
  7. zhios_third_party_utils "code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git/utils"
  8. )
  9. const (
  10. ELM_URL = "http://gw.api.taobao.com/router/rest"
  11. )
  12. func ElemePromotionOrder(ak, sk string, args map[string]string) (*response.AlibabaAlscUnionKbcpxPositiveOrderGetResponse, error) {
  13. client := topsdk.NewDefaultTopClient(ak, sk, ELM_URL, 20000, 20000)
  14. ability := defaultability.NewDefaultability(&client)
  15. AlibabaAlscUnionKbcpxPositiveOrderGetRequest := request.AlibabaAlscUnionKbcpxPositiveOrderGetRequest{}
  16. AlibabaAlscUnionKbcpxPositiveOrderGetRequest.SetBizUnit(2)
  17. AlibabaAlscUnionKbcpxPositiveOrderGetRequest.SetDateType(4) //时间维度,1-付款时间 2-创建时间 3-结算时间 4-更新时间
  18. AlibabaAlscUnionKbcpxPositiveOrderGetRequest.SetEndDate(args["end_time"])
  19. AlibabaAlscUnionKbcpxPositiveOrderGetRequest.SetPageNumber(zhios_third_party_utils.StrToInt64(args["p"]))
  20. AlibabaAlscUnionKbcpxPositiveOrderGetRequest.SetPageSize(zhios_third_party_utils.StrToInt64(args["size"]))
  21. AlibabaAlscUnionKbcpxPositiveOrderGetRequest.SetStartDate(args["start_time"])
  22. resp, err := ability.AlibabaAlscUnionKbcpxPositiveOrderGet(&AlibabaAlscUnionKbcpxPositiveOrderGetRequest)
  23. if err != nil {
  24. return nil, err
  25. }
  26. return resp, nil
  27. }