315 lines
9.4 KiB
Go
315 lines
9.4 KiB
Go
package cs
|
|
|
|
import (
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/requests"
|
|
"golib.gaore.com/GaoreGo/gaore-common-sdk-go/sdk/responses"
|
|
)
|
|
|
|
/**
|
|
* 客服工单,相关方法
|
|
*/
|
|
|
|
type UploadRequest struct {
|
|
*requests.StreamRequest
|
|
FileStream []byte
|
|
}
|
|
|
|
type UploadResponse struct {
|
|
*responses.BaseResponse
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
Data struct {
|
|
FileName string `json:"file_name"`
|
|
FileUrl string `json:"file_url"`
|
|
FilePath string `json:"file_path"`
|
|
}
|
|
TraceId string `json:"trace_id"`
|
|
}
|
|
|
|
func CreateUploadRequest() (req *UploadRequest) {
|
|
req = &UploadRequest{
|
|
StreamRequest: &requests.StreamRequest{},
|
|
}
|
|
|
|
req.InitWithApiInfo(HOST, VERSION, "/v1/work_order/upload_image")
|
|
req.Method = requests.POST
|
|
return
|
|
}
|
|
|
|
func CreateUploadResponse() (resp *UploadResponse) {
|
|
return &UploadResponse{
|
|
BaseResponse: &responses.BaseResponse{},
|
|
}
|
|
}
|
|
|
|
// 获取工单补充字段设置
|
|
|
|
// GetOrderFurtherPartParam 请求参数
|
|
type GetOrderFurtherPartParam struct {
|
|
OrderNum string `json:"order_num"`
|
|
}
|
|
type GetOrderFurtherPartRequest struct {
|
|
*requests.JsonRequest
|
|
OrderNum string `position:"Json" field:"order_num"`
|
|
}
|
|
type OrderFurtherPart struct {
|
|
OrderNum string `json:"order_num"`
|
|
FurtherParts []*OrderPart `json:"further_parts"`
|
|
}
|
|
|
|
type GetOrderFurtherPartResponse struct {
|
|
*responses.BaseResponse
|
|
Code int `json:"code"`
|
|
Data OrderFurtherPart `json:"data"`
|
|
Msg string `json:"msg"`
|
|
}
|
|
|
|
func CreateGetOrderFurtherPartRequest(param GetOrderFurtherPartParam) (req *GetOrderFurtherPartRequest) {
|
|
req = &GetOrderFurtherPartRequest{
|
|
JsonRequest: &requests.JsonRequest{},
|
|
OrderNum: param.OrderNum,
|
|
}
|
|
req.InitWithApiInfo(HOST, VERSION, "/v1/work_order/get_order_further_part")
|
|
req.Method = requests.POST
|
|
return
|
|
}
|
|
func CreateGetOrderFurtherPartResponse() (resp *GetOrderFurtherPartResponse) {
|
|
return &GetOrderFurtherPartResponse{
|
|
BaseResponse: &responses.BaseResponse{},
|
|
}
|
|
}
|
|
|
|
// OrderUrgentParam 用户催单
|
|
type OrderUrgentParam struct {
|
|
OrderNum string `json:"order_num"`
|
|
}
|
|
type OrderUrgentRequest struct {
|
|
*requests.JsonRequest
|
|
OrderNum string `position:"Json" field:"order_num"`
|
|
}
|
|
type OrderUrgentResponse struct {
|
|
*responses.BaseResponse
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
}
|
|
|
|
func CreateOrderUrgentRequest(param OrderUrgentParam) (req *OrderUrgentRequest) {
|
|
req = &OrderUrgentRequest{
|
|
JsonRequest: &requests.JsonRequest{},
|
|
OrderNum: param.OrderNum,
|
|
}
|
|
req.InitWithApiInfo(HOST, VERSION, "/v1/work_order/order_urgent")
|
|
req.Method = requests.POST
|
|
return
|
|
}
|
|
func CreateOrderUrgentResponse() (resp *OrderUrgentResponse) {
|
|
return &OrderUrgentResponse{
|
|
BaseResponse: &responses.BaseResponse{},
|
|
}
|
|
}
|
|
|
|
// OrderUpdateHandleParam 更新工单处理标识
|
|
type OrderUpdateHandleParam struct {
|
|
OrderNum string `json:"order_num"`
|
|
IsHandle int64 `json:"is_handle"`
|
|
}
|
|
type OrderUpdateHandleRequest struct {
|
|
*requests.JsonRequest
|
|
OrderNum string `position:"Json" field:"order_num"`
|
|
IsHandle int64 `position:"Json" field:"is_handle"`
|
|
}
|
|
type OrderUpdateHandleResponse struct {
|
|
*responses.BaseResponse
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
}
|
|
|
|
func CreateOrderUpdateHandleRequest(param OrderUpdateHandleParam) (req *OrderUpdateHandleRequest) {
|
|
req = &OrderUpdateHandleRequest{
|
|
JsonRequest: &requests.JsonRequest{},
|
|
OrderNum: param.OrderNum,
|
|
IsHandle: param.IsHandle,
|
|
}
|
|
req.InitWithApiInfo(HOST, VERSION, "/v1/work_order/order_handle")
|
|
req.Method = requests.POST
|
|
return
|
|
}
|
|
func CreateOrderUpdateHandleResponse() (resp *OrderUpdateHandleResponse) {
|
|
return &OrderUpdateHandleResponse{
|
|
BaseResponse: &responses.BaseResponse{},
|
|
}
|
|
}
|
|
|
|
// OrderAppraiseParam 用户评价工单
|
|
type OrderAppraiseParam struct {
|
|
OrderNum string `json:"order_num"`
|
|
Score int `json:"score"`
|
|
}
|
|
type OrderAppraiseRequest struct {
|
|
*requests.JsonRequest
|
|
OrderNum string `position:"Json" field:"order_num"`
|
|
Score int `position:"Json" field:"score"`
|
|
}
|
|
type OrderAppraiseResponse struct {
|
|
*responses.BaseResponse
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
}
|
|
|
|
func CreateOrderAppraiseRequest(param OrderAppraiseParam) (req *OrderAppraiseRequest) {
|
|
req = &OrderAppraiseRequest{
|
|
JsonRequest: &requests.JsonRequest{},
|
|
OrderNum: param.OrderNum,
|
|
Score: param.Score,
|
|
}
|
|
req.InitWithApiInfo(HOST, VERSION, "/v1/work_order/order_appraise")
|
|
req.Method = requests.POST
|
|
return
|
|
}
|
|
func CreateOrderAppraiseResponse() (resp *OrderAppraiseResponse) {
|
|
return &OrderAppraiseResponse{
|
|
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{},
|
|
}
|
|
}
|
|
|
|
// OrderSubmitParam 工单提交
|
|
type OrderSubmitParam struct {
|
|
GameId int64 `json:"game_id"`
|
|
UserName string `json:"user_name"`
|
|
Uid int64 `json:"uid"`
|
|
RoleId string `json:"role_id"`
|
|
RoleName string `json:"role_name"`
|
|
ServerName string `json:"server_name"`
|
|
OrderTemplateCode string `json:"order_template_code"`
|
|
Detail string `json:"detail"`
|
|
Phone string `json:"phone"`
|
|
ApplyIp string `json:"apply_ip"`
|
|
OrderParts []OrderSubmitPart `json:"order_parts"`
|
|
SmsCode string `json:"sms_code"`
|
|
}
|
|
|
|
type OrderSubmitPart struct {
|
|
PartId int64 `json:"part_id"`
|
|
PartKey string `json:"part_key"`
|
|
PartName string `json:"part_name"`
|
|
PartValue string `json:"part_value"`
|
|
PartType int64 `json:"part_type"`
|
|
PicValue []string `json:"pic_value"`
|
|
}
|
|
type OrderSubmitRequest struct {
|
|
*requests.JsonRequest
|
|
GameId int64 `position:"Json" field:"game_id"`
|
|
UserName string `position:"Json" field:"user_name"`
|
|
Uid int64 `position:"Json" field:"uid"`
|
|
RoleId string `position:"Json" field:"role_id"`
|
|
RoleName string `position:"Json" field:"role_name"`
|
|
ServerName string `position:"Json" field:"server_name"`
|
|
OrderTemplateCode string `position:"Json" field:"order_template_code"`
|
|
Detail string `position:"Json" field:"detail"`
|
|
Phone string `position:"Json" field:"phone"`
|
|
ApplyIp string `position:"Json" field:"apply_ip"`
|
|
OrderParts []OrderSubmitPart `position:"Json" field:"order_parts"`
|
|
SmsCode string `position:"Json" field:"sms_code"`
|
|
}
|
|
type OrderSubmitResponse struct {
|
|
*responses.BaseResponse
|
|
Code int `json:"code"`
|
|
Msg string `json:"msg"`
|
|
Data struct {
|
|
OrderNum string `json:"order_num"`
|
|
} `json:"data"`
|
|
}
|
|
|
|
func CreateOrderSubmitRequest(param OrderSubmitParam) (req *OrderSubmitRequest) {
|
|
req = &OrderSubmitRequest{
|
|
JsonRequest: &requests.JsonRequest{},
|
|
GameId: param.GameId,
|
|
UserName: param.UserName,
|
|
Uid: param.Uid,
|
|
RoleId: param.RoleId,
|
|
RoleName: param.RoleName,
|
|
ServerName: param.ServerName,
|
|
OrderTemplateCode: param.OrderTemplateCode,
|
|
Detail: param.Detail,
|
|
Phone: param.Phone,
|
|
ApplyIp: param.ApplyIp,
|
|
OrderParts: param.OrderParts,
|
|
SmsCode: param.SmsCode,
|
|
}
|
|
req.InitWithApiInfo(HOST, VERSION, "/v1/work_order/order_submit")
|
|
req.Method = requests.POST
|
|
return
|
|
}
|
|
func CreateOrderSubmitResponse() (resp *OrderSubmitResponse) {
|
|
return &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{},
|
|
}
|
|
}
|