81 lines
1.9 KiB
Go
81 lines
1.9 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{},
|
|
}
|
|
}
|