1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- package order
- import (
- "context"
- "gd_service/apis"
- "encoding/json"
- "testing"
- )
- func Test_ServiceGetOrderList(t *testing.T) {
- req := apis.ServiceGetOrderListReq{Uid: 26, AppKey: "123456"}
- reply := apis.ServiceGetOrderListReply{}
- if err := xcli.Call(context.Background(), "ServiceGetOrderList", req, &reply); err != nil {
- t.Error("failed to call: ", err)
- } else {
- d, _ := json.Marshal(reply)
- t.Log(string(d))
- }
- }
- func Test_ServiceGetAnnualInspectionOrderInfo(t *testing.T) {
- req := apis.ServiceGetAnnualInspectionOrderInfoReq{OrderNo: "123", AppKey: "123456"}
- //req := apis.ServiceGetAnnualInspectionOrderInfoReq{OrderNo: "081161907589", AppKey: "123456"}
- reply := apis.ServiceGetAnnualInspectionOrderInfoReply{}
- if err := xcli.Call(context.Background(), "ServiceGetAnnualInspectionOrderInfo", req, &reply); err != nil {
- t.Error("failed to call: ", err)
- } else {
- d, _ := json.Marshal(reply)
- t.Log(string(d))
- }
- }
- /*func Test_ServiceCreateOrderInfo(t *testing.T) {
- req := apis.ServiceGetAnnualInspectionOrderInfoReq{OrderNo:"123",AppKey:"123456"}
- req := apis.ServiceCreateOrderReq{
- AppKey: "123456",
- UserAddress: "地址地址",
- PlateNo: "川A12328",
- PhoneNumber: "13540735437",
- Name: "liu",
- Reservation: "2018-11-19 09:00:00",
- Longitude: 0,
- Latitude: 0,
- NotifyUrl: "xxx",
- Uid: 1,
- Service: "2",
- }
- reply := apis.ServiceCreateOrderReply{}
- if err := xcli.Call(context.Background(), "ServiceCreateOrder", req, &reply); err != nil {
- t.Error("failed to call: ", err)
- } else {
- d, _ := json.Marshal(reply)
- t.Log(string(d))
- }
- }
- */
|