TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
TrainEmployementOrderQueryRequest req = new TrainEmployementOrderQueryRequest();
req.setPassengerName("朱佩钰");
req.setCardNum("130921199811111111");
req.setOrderId(123456L);
req.setOrderTimeStart(StringUtils.parseDateTime("2023-11-30 00:00:00"));
req.setPhoneNum("123456");
req.setOrderTimeEnd(StringUtils.parseDateTime("2023-12-30 00:00:00"));
TrainEmployementOrderQueryResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());
ITopClient client = new DefaultTopClient(url, appkey, secret);
TrainEmployementOrderQueryRequest req = new TrainEmployementOrderQueryRequest();
req.PassengerName = "朱佩钰";
req.CardNum = "130921199811111111";
req.OrderId = 123456L;
req.OrderTimeStart = DateTime.Parse("2023-11-30 00:00:00");
req.PhoneNum = "123456";
req.OrderTimeEnd = DateTime.Parse("2023-12-30 00:00:00");
TrainEmployementOrderQueryResponse rsp = client.Execute(req, sessionKey);
Console.WriteLine(rsp.Body);
$c = new TopClient;
$c->appkey = $appkey;
$c->secretKey = $secret;
$req = new TrainEmployementOrderQueryRequest;
$req->setPassengerName("朱佩钰");
$req->setCardNum("130921199811111111");
$req->setOrderId("123456");
$req->setOrderTimeStart("2023-11-30 00:00:00");
$req->setPhoneNum("123456");
$req->setOrderTimeEnd("2023-12-30 00:00:00");
$resp = $c->execute($req, $sessionKey);
curl -X POST 'http://gw.api.taobao.com/router/rest' \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'app_key=12129701' \
-d 'format=json' \
-d 'method=taobao.train.employement.order.query' \
-d 'partner_id=apidoc' \
-d 'session=52732c16-6edb-45f8-b966-00041fa5455e' \
-d 'sign=A139A06DA9263269192878D3B004FC93' \
-d 'sign_method=hmac' \
-d 'timestamp=2024-11-21+17%3A04%3A17' \
-d 'v=2.0' \
-d 'card_num=130921199811111111' \
-d 'order_id=123456' \
-d 'order_time_end=2023-12-30+00%3A00%3A00' \
-d 'order_time_start=2023-11-30+00%3A00%3A00' \
-d 'passenger_name=%E6%9C%B1%E4%BD%A9%E9%92%B0' \
-d 'phone_num=123456'
# -*- coding: utf-8 -*-
import top.api
req=top.api.TrainEmployementOrderQueryRequest(url,port)
req.set_app_info(top.appinfo(appkey,secret))
req.passenger_name="朱佩钰"
req.card_num="130921199811111111"
req.order_id=123456
req.order_time_start="2023-11-30 00:00:00"
req.phone_num="123456"
req.order_time_end="2023-12-30 00:00:00"
try:
resp= req.getResponse(sessionkey)
print(resp)
except Exception,e:
print(e)
pTopRequest pRequest = alloc_top_request();
pTopResponse pResponse = NULL;
pTaobaoClient pClient = alloc_taobao_client(url, appkey, appsecret);
set_api_name(pRequest,"taobao.train.employement.order.query");
add_param(pRequest,"passenger_name","朱佩钰");
add_param(pRequest,"card_num","130921199811111111");
add_param(pRequest,"order_id","123456");
add_param(pRequest,"order_time_start","2023-11-30 00:00:00");
add_param(pRequest,"phone_num","123456");
add_param(pRequest,"order_time_end","2023-12-30 00:00:00");
pResponse = top_execute(pClient,pRequest,sessionKey);
printf("ret code:%d\n",pResponse->code);
if(pResponse->code == 0){
pTopResponseIterator ite = init_response_iterator(pResponse);
pResultItem pResultItem = alloc_result_item();
while(parseNext(ite, pResultItem) == 0){
printf("%s:%s\n",pResultItem->key,pResultItem->value);
}
destroy_response_iterator(ite);
destroy_result_item(pResultItem);
}
destroy_top_request(pRequest);
destroy_top_response(pResponse);
destroy_taobao_client(pClient);
TopClient = require('./topClient').TopClient;
var client = new TopClient({
'appkey': 'appkey',
'appsecret': 'secret',
'REST_URL': 'http://gw.api.taobao.com/router/rest'
});
client.execute('taobao.train.employement.order.query', {
'passenger_name':'朱佩钰',
'card_num':'130921199811111111',
'order_id':'123456',
'order_time_start':'2023-11-30 00:00:00',
'phone_num':'123456',
'order_time_end':'2023-12-30 00:00:00'
}, function(error, response) {
if (!error) console.log(response);
else console.log(error);
})