diff --git a/services/cs/client.go b/services/cs/client.go index 55ba866..c1e7fcb 100644 --- a/services/cs/client.go +++ b/services/cs/client.go @@ -104,3 +104,9 @@ func (client *Client) OrderSubmit(req *OrderSubmitRequest) (resp *OrderSubmitRes err = client.DoAction(req, resp) return } + +func (client *Client) OrderFurtherPart(req *OrderFurtherPartRequest) (resp *OrderFurtherPartResponse, err error) { + resp = CreateOrderFurtherPartResponse() + err = client.DoAction(req, resp) + return +} diff --git a/services/cs/client_test.go b/services/cs/client_test.go index f2bf509..547fad1 100644 --- a/services/cs/client_test.go +++ b/services/cs/client_test.go @@ -185,6 +185,7 @@ func TestOrderUrgent(t *testing.T) { fmt.Printf(fmt.Sprintf("%v", res)) } +// 用户更新工单处理标识 func TestOrderUpdateHandle(t *testing.T) { client, newErr := NewClient() if newErr != nil { @@ -204,6 +205,7 @@ func TestOrderUpdateHandle(t *testing.T) { fmt.Printf(fmt.Sprintf("%v", res)) } +// 用户评价工单 func TestOrderAppraise(t *testing.T) { client, newErr := NewClient() if newErr != nil { @@ -224,6 +226,7 @@ func TestOrderAppraise(t *testing.T) { fmt.Printf(fmt.Sprintf("%v", res)) } +// 工单重启 func TestOrderRestart(t *testing.T) { client, newErr := NewClient() if newErr != nil { @@ -244,6 +247,8 @@ func TestOrderRestart(t *testing.T) { } fmt.Printf(fmt.Sprintf("%v", res)) } + +// 提交工单 func TestOrderSubmit(t *testing.T) { client, newErr := NewClient() if newErr != nil { @@ -290,3 +295,30 @@ func TestOrderSubmit(t *testing.T) { } fmt.Printf(fmt.Sprintf("%v", res)) } + +// 用户工单补充资料 +func TestOrderFurtherPart(t *testing.T) { + client, newErr := NewClient() + if newErr != nil { + panic(newErr) + } + req := CreateOrderFurtherPartRequest(OrderFurtherPartParam{ + OrderNum: "20250611160840208567", + OrderParts: []OrderSubmitPart{ + { + PartKey: "game_name", + PartName: "游戏名称", + PartValue: "镇魂街:最终章", + }, + }, + }) + res, err := client.OrderFurtherPart(req) + if err != nil { + t.Error(err) + return + } + if res.Code != 0 { + t.Error("用户工单补充资料失败") + } + fmt.Printf(fmt.Sprintf("%v", res)) +} diff --git a/services/cs/order.go b/services/cs/order.go index 5678828..833f9a3 100644 --- a/services/cs/order.go +++ b/services/cs/order.go @@ -280,3 +280,35 @@ func CreateOrderSubmitResponse() (resp *OrderSubmitResponse) { BaseResponse: &responses.BaseResponse{}, } } + +// OrderFurtherPartParam 工单补充资料 +type OrderFurtherPartParam struct { + OrderNum string `json:"order_num"` + OrderParts []OrderSubmitPart `json:"order_parts"` +} +type OrderFurtherPartRequest struct { + *requests.JsonRequest + OrderNum string `position:"Json" field:"order_num"` + OrderParts []OrderSubmitPart `position:"Json" field:"order_parts"` +} +type OrderFurtherPartResponse struct { + *responses.BaseResponse + Code int `json:"code"` + Msg string `json:"msg"` +} + +func CreateOrderFurtherPartRequest(param OrderFurtherPartParam) (req *OrderFurtherPartRequest) { + req = &OrderFurtherPartRequest{ + JsonRequest: &requests.JsonRequest{}, + OrderNum: param.OrderNum, + OrderParts: param.OrderParts, + } + req.InitWithApiInfo(HOST, VERSION, "/v1/work_order/order_further_data") + req.Method = requests.POST + return +} +func CreateOrderFurtherPartResponse() (resp *OrderFurtherPartResponse) { + return &OrderFurtherPartResponse{ + BaseResponse: &responses.BaseResponse{}, + } +}