package org.dromara.zhishu.controller;

import com.pdd.pop.sdk.common.util.JsonUtil;
import com.pdd.pop.sdk.http.PopClient;
import com.pdd.pop.sdk.http.PopHttpClient;
import com.pdd.pop.sdk.http.api.pop.request.PddOrderListGetRequest;
import com.pdd.pop.sdk.http.api.pop.response.PddOrderListGetResponse;

import java.util.Date;

public class PddOrderContorller {



//    //授权页面url
//    String clientId = "203c5a7ba8bd4b8488d5e26f93052642";
//    String clientSecret = "892ffaa86e12b7a3d8d2942b669d9aa520ad8179";


    public static void main(String[] args) throws Exception {


        //授权页面url
        String clientId = "203c5a7ba8bd4b8488d5e26f93052642";
        String clientSecret = "892ffaa86e12b7a3d8d2942b669d9aa520ad8179";
//        String clientId = clientId;
//        String clientSecret = "your clientSecret";
        String accessToken = "83b0b0e8aca14fba89e03ab42476dc7f403ffb39";

//        String clientId = "your clientId";
//        String clientSecret = "your clientSecret";
//        String accessToken = "your accessToken";
        PopClient client = new PopHttpClient(clientId, clientSecret);

        PddOrderListGetRequest request = new PddOrderListGetRequest();
        request.setEndConfirmAt(1L);
        request.setOrderStatus(5);
        request.setPage(1);
        request.setPageSize(100);
        request.setRefundStatus(5);
        request.setStartConfirmAt(1L);
        request.setTradeType(1);
        request.setUseHasNext(true);
        PddOrderListGetResponse response = client.syncInvoke(request, accessToken);
        System.out.println(JsonUtil.transferToJson(response));





        Date date = new Date();

        System.out.println(date.getTime());
        System.out.println("1742019835298".length());








    }
}
