【cs服务】
1、工单记录列表查询
This commit is contained in:
parent
32ba08b231
commit
e79d0819ad
@ -110,3 +110,8 @@ func (client *Client) OrderFurtherPart(req *OrderFurtherPartRequest) (resp *Orde
|
|||||||
err = client.DoAction(req, resp)
|
err = client.DoAction(req, resp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
func (client *Client) OrderRecordList(req *GetWorkOrderRecordListRequest) (resp *GetWorkOrderRecordListResponse, err error) {
|
||||||
|
resp = CreateGetWorkOrderRecordListResponse()
|
||||||
|
err = client.DoAction(req, resp)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
@ -322,3 +322,27 @@ func TestOrderFurtherPart(t *testing.T) {
|
|||||||
}
|
}
|
||||||
fmt.Printf(fmt.Sprintf("%v", res))
|
fmt.Printf(fmt.Sprintf("%v", res))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 工单列表查询
|
||||||
|
func TestGetWorkOrderRecordList(t *testing.T) {
|
||||||
|
client, newErr := NewClient()
|
||||||
|
if newErr != nil {
|
||||||
|
panic(newErr)
|
||||||
|
}
|
||||||
|
req := CreateGetWorkOrderRecordListRequest(GetWorkOrderRecordListParam{
|
||||||
|
HandleStatus: "",
|
||||||
|
UserName: "ws45265737",
|
||||||
|
GameId: 7991,
|
||||||
|
Page: 1,
|
||||||
|
PageSize: 20,
|
||||||
|
})
|
||||||
|
res, err := client.OrderRecordList(req)
|
||||||
|
if err != nil {
|
||||||
|
t.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if res.Code != 0 {
|
||||||
|
t.Error("工单列表查询失败")
|
||||||
|
}
|
||||||
|
fmt.Printf(fmt.Sprintf("%v", res))
|
||||||
|
}
|
||||||
|
87
services/cs/orderrecord.go
Normal file
87
services/cs/orderrecord.go
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
package cs
|
||||||
|
|
||||||
|
import (
|
||||||
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
||||||
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
||||||
|
)
|
||||||
|
|
||||||
|
// 获取客服工单列表
|
||||||
|
|
||||||
|
type GetWorkOrderRecordListParam struct {
|
||||||
|
OrderNum string `position:"Json" field:"order_num"`
|
||||||
|
Page int64 `position:"Json" field:"page"`
|
||||||
|
PageSize int64 `position:"Json" field:"page_size"`
|
||||||
|
UserName string `position:"Json" field:"user_name"`
|
||||||
|
GameId int64 `position:"Json" field:"game_id"`
|
||||||
|
HandleStatus string `position:"Json" field:"handle_status"`
|
||||||
|
}
|
||||||
|
type OrderRecord struct {
|
||||||
|
OrderNum string `json:"order_num"`
|
||||||
|
WorkOrderTemplateFirstLevelName string `json:"work_order_template_first_level_name"`
|
||||||
|
UserName string `json:"user_name"`
|
||||||
|
GameId int64 `json:"game_id"`
|
||||||
|
GameName string `json:"game_name"`
|
||||||
|
RoleId string `json:"role_id"`
|
||||||
|
RoleName string `json:"role_name"`
|
||||||
|
ServerName string `json:"server_name"`
|
||||||
|
Detail string `json:"detail"`
|
||||||
|
ApplyTime string `json:"apply_time"`
|
||||||
|
HandleStatus string `json:"handle_status"`
|
||||||
|
HandleStatusName string `json:"handle_status_name"`
|
||||||
|
IsUrgent int64 `json:"is_urgent"`
|
||||||
|
IsAppraise int64 `json:"is_appraise"`
|
||||||
|
FinishTime string `json:"finish_time"`
|
||||||
|
OrderParts []*OrderSubmitPart `json:"order_parts"`
|
||||||
|
Id int64 `json:"id"`
|
||||||
|
WorkOrderTemplateFirstLevelId int64 `json:"work_order_template_first_level_id"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// PageInfoResp 分页响应
|
||||||
|
type PageInfoResp struct {
|
||||||
|
Page int `json:"page"`
|
||||||
|
PageSize int `json:"page_size"`
|
||||||
|
TotalNumber int `json:"total_number"`
|
||||||
|
TotalPage int `json:"total_page"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetWorkOrderRecordListResponse struct {
|
||||||
|
*responses.BaseResponse
|
||||||
|
Code int `json:"code"`
|
||||||
|
Data struct {
|
||||||
|
Data []*OrderRecord `json:"data"`
|
||||||
|
PageInfo *PageInfoResp `json:"page_info"`
|
||||||
|
} `json:"data"`
|
||||||
|
Msg string `json:"msg"`
|
||||||
|
TraceId string `json:"trace_id"`
|
||||||
|
}
|
||||||
|
type GetWorkOrderRecordListRequest struct {
|
||||||
|
*requests.JsonRequest
|
||||||
|
OrderNum string `position:"Json" field:"order_num"`
|
||||||
|
Page int64 `position:"Json" field:"page"`
|
||||||
|
PageSize int64 `position:"Json" field:"page_size"`
|
||||||
|
UserName string `position:"Json" field:"user_name"`
|
||||||
|
GameId int64 `position:"Json" field:"game_id"`
|
||||||
|
HandleStatus string `position:"Json" field:"handle_status"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func CreateGetWorkOrderRecordListRequest(param GetWorkOrderRecordListParam) (req *GetWorkOrderRecordListRequest) {
|
||||||
|
req = &GetWorkOrderRecordListRequest{
|
||||||
|
JsonRequest: &requests.JsonRequest{},
|
||||||
|
}
|
||||||
|
req.OrderNum = param.OrderNum
|
||||||
|
req.Page = param.Page
|
||||||
|
req.PageSize = param.PageSize
|
||||||
|
req.UserName = param.UserName
|
||||||
|
req.GameId = param.GameId
|
||||||
|
req.HandleStatus = param.HandleStatus
|
||||||
|
|
||||||
|
req.InitWithApiInfo(HOST, VERSION, "/v1/work_order/order_record_list")
|
||||||
|
req.Method = requests.POST
|
||||||
|
return
|
||||||
|
}
|
||||||
|
func CreateGetWorkOrderRecordListResponse() (resp *GetWorkOrderRecordListResponse) {
|
||||||
|
resp = &GetWorkOrderRecordListResponse{
|
||||||
|
BaseResponse: &responses.BaseResponse{},
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user