209 lines
5.5 KiB
Go
209 lines
5.5 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{},
|
|
}
|
|
}
|