Compare commits
No commits in common. "eb25c8f20a013acd51cb492571aba49c659ef5ab" and "f3a11907ee507c9c40fb25021be4e732e83e3dbf" have entirely different histories.
eb25c8f20a
...
f3a11907ee
@ -120,15 +120,3 @@ func (client *Client) OrderRecordDetail(req *GetWorkOrderRecordDetailReq) (resp
|
|||||||
err = client.DoAction(req, resp)
|
err = client.DoAction(req, resp)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (client *Client) GetFaqDetail(req *GetFaqDetailRequest) (resp *GetFaqDetailResponse, err error) {
|
|
||||||
resp = CreateGetFaqDetailResponse()
|
|
||||||
err = client.DoAction(req, resp)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func (client *Client) GetHotFaqList(req *GetHotFaqRequest) (resp *GetHotFaqResponse, err error) {
|
|
||||||
resp = CreateGetHotFaqResponse()
|
|
||||||
err = client.DoAction(req, resp)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
@ -366,41 +366,3 @@ func TestOrderRecordDetail(t *testing.T) {
|
|||||||
}
|
}
|
||||||
fmt.Printf(fmt.Sprintf("%v", res))
|
fmt.Printf(fmt.Sprintf("%v", res))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取faq详情
|
|
||||||
func TestGetFaqDetail(t *testing.T) {
|
|
||||||
client, newErr := NewClient()
|
|
||||||
if newErr != nil {
|
|
||||||
panic(newErr)
|
|
||||||
}
|
|
||||||
req := CreateGetFaqDetailRequest(FaqDetailRequest{
|
|
||||||
Id: int64(31),
|
|
||||||
})
|
|
||||||
res, err := client.GetFaqDetail(req)
|
|
||||||
if err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if res.Code != 0 || res.Data.Id == 0 {
|
|
||||||
t.Error("获取faq详情失败")
|
|
||||||
}
|
|
||||||
fmt.Printf(fmt.Sprintf("%v", res))
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取热门faq
|
|
||||||
func TestGetFaqHotList(t *testing.T) {
|
|
||||||
client, newErr := NewClient()
|
|
||||||
if newErr != nil {
|
|
||||||
panic(newErr)
|
|
||||||
}
|
|
||||||
req := CreateGetHotFaqRequest()
|
|
||||||
res, err := client.GetHotFaqList(req)
|
|
||||||
if err != nil {
|
|
||||||
t.Error(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if res.Code != 0 || len(res.Data) == 0 {
|
|
||||||
t.Error("获取热门faq失败")
|
|
||||||
}
|
|
||||||
fmt.Printf(fmt.Sprintf("%v", res))
|
|
||||||
}
|
|
||||||
|
@ -46,75 +46,3 @@ func CreateGetFaqResponse() (response *GetFaqResponse) {
|
|||||||
}
|
}
|
||||||
return
|
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"`
|
|
||||||
}
|
|
||||||
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"`
|
|
||||||
}
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user