【cs服务】
1、工单详情查询
This commit is contained in:
parent
e79d0819ad
commit
f3a11907ee
@ -115,3 +115,8 @@ func (client *Client) OrderRecordList(req *GetWorkOrderRecordListRequest) (resp
|
|||||||
err = client.DoAction(req, resp)
|
err = client.DoAction(req, resp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
func (client *Client) OrderRecordDetail(req *GetWorkOrderRecordDetailReq) (resp *GetWorkOrderRecordDetailResp, err error) {
|
||||||
|
resp = CreateGetWorkOrderRecordDetailResp()
|
||||||
|
err = client.DoAction(req, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -346,3 +346,23 @@ func TestGetWorkOrderRecordList(t *testing.T) {
|
|||||||
}
|
}
|
||||||
fmt.Printf(fmt.Sprintf("%v", res))
|
fmt.Printf(fmt.Sprintf("%v", res))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 工单详情查询
|
||||||
|
func TestOrderRecordDetail(t *testing.T) {
|
||||||
|
client, newErr := NewClient()
|
||||||
|
if newErr != nil {
|
||||||
|
panic(newErr)
|
||||||
|
}
|
||||||
|
req := CreateGetWorkOrderRecordDetailRequest(OrderDetailParam{
|
||||||
|
OrderNum: "20250611160840208567",
|
||||||
|
})
|
||||||
|
res, err := client.OrderRecordDetail(req)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if res.Code != 0 {
|
||||||
|
t.Error("工单详情查询失败")
|
||||||
|
}
|
||||||
|
fmt.Printf(fmt.Sprintf("%v", res))
|
||||||
|
}
|
||||||
|
@ -85,3 +85,51 @@ func CreateGetWorkOrderRecordListResponse() (resp *GetWorkOrderRecordListRespons
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 工单详情
|
||||||
|
|
||||||
|
type OrderDetailParam struct {
|
||||||
|
OrderNum string `json:"order_num"`
|
||||||
|
}
|
||||||
|
type OrderLog struct {
|
||||||
|
Id int64 `json:"id"`
|
||||||
|
ApplyCount int64 `json:"apply_count"`
|
||||||
|
ActionType string `json:"action_type"`
|
||||||
|
PlayerLinkType string `json:"player_link_type"`
|
||||||
|
PlayerLinkTypeName string `json:"player_link_type_name"`
|
||||||
|
Content []*OrderSubmitPart `json:"content"`
|
||||||
|
PicContent []*OrderSubmitPart `json:"pic_content"`
|
||||||
|
CreatedAt string `json:"created_at"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type OrderDetail struct {
|
||||||
|
OrderRecord *OrderRecord `json:"order_record"`
|
||||||
|
OrderLogs []*OrderLog `json:"order_logs"`
|
||||||
|
}
|
||||||
|
type GetWorkOrderRecordDetailResp struct {
|
||||||
|
*responses.BaseResponse
|
||||||
|
Code int `json:"code"`
|
||||||
|
Data OrderDetail `json:"data"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
}
|
||||||
|
type GetWorkOrderRecordDetailReq struct {
|
||||||
|
*requests.JsonRequest
|
||||||
|
OrderNum string `position:"Json" field:"order_num"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateGetWorkOrderRecordDetailRequest(param OrderDetailParam) (req *GetWorkOrderRecordDetailReq) {
|
||||||
|
req = &GetWorkOrderRecordDetailReq{
|
||||||
|
JsonRequest: &requests.JsonRequest{},
|
||||||
|
}
|
||||||
|
req.OrderNum = param.OrderNum
|
||||||
|
|
||||||
|
req.InitWithApiInfo(HOST, VERSION, "/v1/work_order/order_record_detail")
|
||||||
|
req.Method = requests.POST
|
||||||
|
return
|
||||||
|
}
|
||||||
|
func CreateGetWorkOrderRecordDetailResp() (resp *GetWorkOrderRecordDetailResp) {
|
||||||
|
resp = &GetWorkOrderRecordDetailResp{
|
||||||
|
BaseResponse: &responses.BaseResponse{},
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user