From 32ba08b231db757389559431a4fdc68ddf94d0dd Mon Sep 17 00:00:00 2001 From: liguanjie <kingson2011@126.com> Date: Wed, 11 Jun 2025 16:35:33 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90cs=E6=9C=8D=E5=8A=A1=E3=80=91=201?= =?UTF-8?q?=E3=80=81=E7=94=A8=E6=88=B7=E8=A1=A5=E5=85=85=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/cs/client.go | 6 ++++++ services/cs/client_test.go | 32 ++++++++++++++++++++++++++++++++ services/cs/order.go | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+) 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{}, + } +}