Compare commits
	
		
			2 Commits
		
	
	
		
			32ba08b231
			...
			f3a11907ee
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					f3a11907ee | ||
| 
						 | 
					e79d0819ad | 
@ -110,3 +110,13 @@ 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
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					func (client *Client) OrderRecordDetail(req *GetWorkOrderRecordDetailReq) (resp *GetWorkOrderRecordDetailResp, err error) {
 | 
				
			||||||
 | 
						resp = CreateGetWorkOrderRecordDetailResp()
 | 
				
			||||||
 | 
						err = client.DoAction(req, resp)
 | 
				
			||||||
 | 
						return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -322,3 +322,47 @@ 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))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 工单详情查询
 | 
				
			||||||
 | 
					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))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										135
									
								
								services/cs/orderrecord.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										135
									
								
								services/cs/orderrecord.go
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,135 @@
 | 
				
			|||||||
 | 
					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
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 工单详情
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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