204 lines
		
	
	
		
			5.0 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			204 lines
		
	
	
		
			5.0 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"
 | 
						|
)
 | 
						|
 | 
						|
// Faq 树状结构
 | 
						|
type Faq struct {
 | 
						|
	Id                  int64  `json:"id"`
 | 
						|
	ParentId            int64  `json:"parent_id"`
 | 
						|
	Title               string `json:"title"`
 | 
						|
	Answer              string `json:"answer"`
 | 
						|
	Type                int64  `json:"type"`
 | 
						|
	WorkOrderTemplateId int64  `json:"work_order_template_id"`
 | 
						|
	CreatedAt           string `json:"created_at"`
 | 
						|
	UpdatedAt           string `json:"updated_at"`
 | 
						|
	ProcessFlow         string `json:"process_flow"`
 | 
						|
	Children            []*Faq `json:"children"`
 | 
						|
}
 | 
						|
 | 
						|
type GetFaqRequest struct {
 | 
						|
	*requests.RpcRequest
 | 
						|
}
 | 
						|
 | 
						|
type GetFaqResponse struct {
 | 
						|
	*responses.BaseResponse
 | 
						|
	Code int    `json:"code"`
 | 
						|
	Msg  string `json:"msg"`
 | 
						|
	Data Faq    `json:"data"`
 | 
						|
}
 | 
						|
 | 
						|
func CreateGetFaqRequest() (req *GetFaqRequest) {
 | 
						|
	req = &GetFaqRequest{
 | 
						|
		RpcRequest: &requests.RpcRequest{},
 | 
						|
	}
 | 
						|
	req.InitWithApiInfo(HOST, VERSION, "/v1/faq/list")
 | 
						|
 | 
						|
	req.Method = requests.POST
 | 
						|
	return
 | 
						|
}
 | 
						|
 | 
						|
func CreateGetFaqResponse() (response *GetFaqResponse) {
 | 
						|
	response = &GetFaqResponse{
 | 
						|
		BaseResponse: &responses.BaseResponse{},
 | 
						|
	}
 | 
						|
	return
 | 
						|
}
 | 
						|
 | 
						|
// FaqDetail Faq详情
 | 
						|
type FaqDetail struct {
 | 
						|
	Id                    int64  `json:"id"`
 | 
						|
	ParentId              int64  `json:"parent_id"`
 | 
						|
	Title                 string `json:"title"`
 | 
						|
	Answer                string `json:"answer"`
 | 
						|
	Type                  int64  `json:"type"`
 | 
						|
	WorkOrderTemplateId   int64  `json:"work_order_template_id"`
 | 
						|
	ProcessFlow           string `json:"process_flow"`
 | 
						|
	WorkOrderTemplateCode string `json:"work_order_template_code"`
 | 
						|
}
 | 
						|
type GetFaqDetailRequest struct {
 | 
						|
	*requests.JsonRequest
 | 
						|
	Id int64 `position:"Json" field:"id"`
 | 
						|
}
 | 
						|
type GetFaqDetailResponse struct {
 | 
						|
	*responses.BaseResponse
 | 
						|
	Code int        `json:"code"`
 | 
						|
	Msg  string     `json:"msg"`
 | 
						|
	Data *FaqDetail `json:"data"`
 | 
						|
}
 | 
						|
type FaqDetailRequest struct {
 | 
						|
	Id int64 `json:"id"`
 | 
						|
}
 | 
						|
 | 
						|
func CreateGetFaqDetailRequest(param FaqDetailRequest) (req *GetFaqDetailRequest) {
 | 
						|
	req = &GetFaqDetailRequest{
 | 
						|
		JsonRequest: &requests.JsonRequest{},
 | 
						|
		Id:          param.Id,
 | 
						|
	}
 | 
						|
	req.InitWithApiInfo(HOST, VERSION, "/v1/faq/detail")
 | 
						|
 | 
						|
	req.Method = requests.POST
 | 
						|
	return
 | 
						|
}
 | 
						|
func CreateGetFaqDetailResponse() (response *GetFaqDetailResponse) {
 | 
						|
	response = &GetFaqDetailResponse{
 | 
						|
		BaseResponse: &responses.BaseResponse{},
 | 
						|
	}
 | 
						|
	return
 | 
						|
}
 | 
						|
 | 
						|
// 热门faq列表
 | 
						|
type HotFaq struct {
 | 
						|
	Id          int64  `json:"id"`
 | 
						|
	Title       string `json:"title"`
 | 
						|
	ParentId    int64  `json:"parent_id"`
 | 
						|
	ParentTitle string `json:"parent_title"`
 | 
						|
}
 | 
						|
type GetHotFaqRequest struct {
 | 
						|
	*requests.JsonRequest
 | 
						|
}
 | 
						|
type GetHotFaqResponse struct {
 | 
						|
	*responses.BaseResponse
 | 
						|
	Code int      `json:"code"`
 | 
						|
	Msg  string   `json:"msg"`
 | 
						|
	Data []HotFaq `json:"data"`
 | 
						|
}
 | 
						|
 | 
						|
func CreateGetHotFaqRequest() (req *GetHotFaqRequest) {
 | 
						|
	req = &GetHotFaqRequest{
 | 
						|
		JsonRequest: &requests.JsonRequest{},
 | 
						|
	}
 | 
						|
	req.InitWithApiInfo(HOST, VERSION, "/v1/faq/hot_list")
 | 
						|
 | 
						|
	req.Method = requests.POST
 | 
						|
	return
 | 
						|
}
 | 
						|
func CreateGetHotFaqResponse() (response *GetHotFaqResponse) {
 | 
						|
	response = &GetHotFaqResponse{
 | 
						|
		BaseResponse: &responses.BaseResponse{},
 | 
						|
	}
 | 
						|
	return
 | 
						|
}
 | 
						|
 | 
						|
// 清理faq树缓存
 | 
						|
type ClearFaqListCacheRequest struct {
 | 
						|
	*requests.JsonRequest
 | 
						|
}
 | 
						|
type ClearFaqListCacheResponse struct {
 | 
						|
	*responses.BaseResponse
 | 
						|
	Code int    `json:"code"`
 | 
						|
	Msg  string `json:"msg"`
 | 
						|
}
 | 
						|
 | 
						|
func CreateClearFaqListCacheRequest() (req *ClearFaqListCacheRequest) {
 | 
						|
	req = &ClearFaqListCacheRequest{
 | 
						|
		JsonRequest: &requests.JsonRequest{},
 | 
						|
	}
 | 
						|
	req.InitWithApiInfo(HOST, VERSION, "/v1/faq/clear_list_cache")
 | 
						|
 | 
						|
	req.Method = requests.POST
 | 
						|
	return
 | 
						|
}
 | 
						|
func CreateClearFaqListCacheResponse() (response *ClearFaqListCacheResponse) {
 | 
						|
	response = &ClearFaqListCacheResponse{
 | 
						|
		BaseResponse: &responses.BaseResponse{},
 | 
						|
	}
 | 
						|
	return
 | 
						|
}
 | 
						|
 | 
						|
// 清理faq详情缓存
 | 
						|
type ClearFaqDetailCacheRequest struct {
 | 
						|
	*requests.JsonRequest
 | 
						|
	Id int64 `position:"Json" field:"id"`
 | 
						|
}
 | 
						|
type ClearFaqDetailCacheResponse struct {
 | 
						|
	*responses.BaseResponse
 | 
						|
	Code int    `json:"code"`
 | 
						|
	Msg  string `json:"msg"`
 | 
						|
}
 | 
						|
 | 
						|
func CreateClearFaqDetailCacheRequest(param FaqDetailRequest) (req *ClearFaqDetailCacheRequest) {
 | 
						|
	req = &ClearFaqDetailCacheRequest{
 | 
						|
		JsonRequest: &requests.JsonRequest{},
 | 
						|
		Id:          param.Id,
 | 
						|
	}
 | 
						|
	req.InitWithApiInfo(HOST, VERSION, "/v1/faq/clear_detail_cache")
 | 
						|
 | 
						|
	req.Method = requests.POST
 | 
						|
	return
 | 
						|
}
 | 
						|
func CreateClearFaqDetailCacheResponse() (response *ClearFaqDetailCacheResponse) {
 | 
						|
	response = &ClearFaqDetailCacheResponse{
 | 
						|
		BaseResponse: &responses.BaseResponse{},
 | 
						|
	}
 | 
						|
	return
 | 
						|
}
 | 
						|
 | 
						|
// 清理热门faq缓存
 | 
						|
type ClearHotFaqCacheRequest struct {
 | 
						|
	*requests.JsonRequest
 | 
						|
}
 | 
						|
type ClearHotFaqCacheResponse struct {
 | 
						|
	*responses.BaseResponse
 | 
						|
	Code int    `json:"code"`
 | 
						|
	Msg  string `json:"msg"`
 | 
						|
}
 | 
						|
 | 
						|
func CreateClearHotFaqCacheRequest() (req *ClearHotFaqCacheRequest) {
 | 
						|
	req = &ClearHotFaqCacheRequest{
 | 
						|
		JsonRequest: &requests.JsonRequest{},
 | 
						|
	}
 | 
						|
	req.InitWithApiInfo(HOST, VERSION, "/v1/faq/clear_hot_list_cache")
 | 
						|
 | 
						|
	req.Method = requests.POST
 | 
						|
	return
 | 
						|
}
 | 
						|
func CreateClearHotFaqCacheResponse() (response *ClearHotFaqCacheResponse) {
 | 
						|
	response = &ClearHotFaqCacheResponse{
 | 
						|
		BaseResponse: &responses.BaseResponse{},
 | 
						|
	}
 | 
						|
	return
 | 
						|
}
 |