【cs服务】
1、用户重启工单
This commit is contained in:
parent
bc565ac059
commit
ce7d7f2ee7
@ -94,3 +94,8 @@ func (client *Client) OrderAppraise(req *OrderAppraiseRequest) (resp *OrderAppra
|
|||||||
err = client.DoAction(req, resp)
|
err = client.DoAction(req, resp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
func (client *Client) OrderRestart(req *OrderRestartRequest) (resp *OrderRestartResponse, err error) {
|
||||||
|
resp = CreateOrderRestartResponse()
|
||||||
|
err = client.DoAction(req, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -223,3 +223,24 @@ func TestOrderAppraise(t *testing.T) {
|
|||||||
}
|
}
|
||||||
fmt.Printf(fmt.Sprintf("%v", res))
|
fmt.Printf(fmt.Sprintf("%v", res))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestOrderRestart(t *testing.T) {
|
||||||
|
client, newErr := NewClient()
|
||||||
|
if newErr != nil {
|
||||||
|
panic(newErr)
|
||||||
|
}
|
||||||
|
req := CreateOrderRestartRequest(OrderRestartParam{
|
||||||
|
OrderNum: "20250530173554491048",
|
||||||
|
RemarkContent: "模拟用户重启",
|
||||||
|
RemarkPic: []string{},
|
||||||
|
})
|
||||||
|
res, err := client.OrderRestart(req)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if res.Code != 0 {
|
||||||
|
t.Error("工单重启失败")
|
||||||
|
}
|
||||||
|
fmt.Printf(fmt.Sprintf("%v", res))
|
||||||
|
}
|
||||||
|
@ -171,3 +171,38 @@ func CreateOrderAppraiseResponse() (resp *OrderAppraiseResponse) {
|
|||||||
BaseResponse: &responses.BaseResponse{},
|
BaseResponse: &responses.BaseResponse{},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OrderRestartParam 用户重启工单
|
||||||
|
type OrderRestartParam struct {
|
||||||
|
OrderNum string `json:"order_num"`
|
||||||
|
RemarkContent string `json:"remark_content"`
|
||||||
|
RemarkPic []string `json:"remark_pic"`
|
||||||
|
}
|
||||||
|
type OrderRestartRequest struct {
|
||||||
|
*requests.JsonRequest
|
||||||
|
OrderNum string `position:"Json" field:"order_num"`
|
||||||
|
RemarkContent string `position:"Json" field:"remark_content"`
|
||||||
|
RemarkPic []string `position:"Json" field:"remark_pic"`
|
||||||
|
}
|
||||||
|
type OrderRestartResponse struct {
|
||||||
|
*responses.BaseResponse
|
||||||
|
Code int `json:"code"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateOrderRestartRequest(param OrderRestartParam) (req *OrderRestartRequest) {
|
||||||
|
req = &OrderRestartRequest{
|
||||||
|
JsonRequest: &requests.JsonRequest{},
|
||||||
|
OrderNum: param.OrderNum,
|
||||||
|
RemarkContent: param.RemarkContent,
|
||||||
|
RemarkPic: param.RemarkPic,
|
||||||
|
}
|
||||||
|
req.InitWithApiInfo(HOST, VERSION, "/v1/work_order/order_restart")
|
||||||
|
req.Method = requests.POST
|
||||||
|
return
|
||||||
|
}
|
||||||
|
func CreateOrderRestartResponse() (resp *OrderRestartResponse) {
|
||||||
|
return &OrderRestartResponse{
|
||||||
|
BaseResponse: &responses.BaseResponse{},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user