第三方api接口
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

api.go 1.6 KiB

5 달 전
12345678910111213141516171819202122232425262728293031
  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. }