aa
This commit is contained in:
@@ -315,3 +315,22 @@ func (a *API) PoiSettleAuditSubmit(appPoiCodes []string) (err error) {
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
type CommentScoreResult struct {
|
||||
AppPoiCode string `json:"appPoiCode"`
|
||||
AvgPoiScore float64 `json:"avgPoiScore"`
|
||||
AvgTasteScore float64 `json:"avgTasteScore"`
|
||||
AvgPackingScore float64 `json:"avgPackingScore"`
|
||||
AvgDeliveryScore float64 `json:"avgDeliveryScore"`
|
||||
}
|
||||
|
||||
// 通过门店ID获取当前门店评分
|
||||
func (a *API) CommentScore(appPoiCode string) (commentScoreResult *CommentScoreResult, err error) {
|
||||
result, err := a.AccessAPI("comment/score", true, map[string]interface{}{
|
||||
"app_poi_code": appPoiCode,
|
||||
})
|
||||
if err == nil {
|
||||
utils.Map2StructByJson(result, &commentScoreResult, false)
|
||||
}
|
||||
return commentScoreResult, err
|
||||
}
|
||||
|
||||
@@ -149,3 +149,11 @@ func TestPoiSettleSettlementList(t *testing.T) {
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestCommentScore(t *testing.T) {
|
||||
result, err := api.CommentScore("11182878")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user