|
@@ -419,6 +419,7 @@ func (s *StoreEntry) SearchFeedStatistics(ctx context.Context, req *operationPb.
|
|
|
response := &model.PastureCommonResponse{
|
|
|
Data: &model.PastureCommonData{},
|
|
|
}
|
|
|
+
|
|
|
if _, err = s.PastureHttpClient(ctx, model.UrlDataByName, int64(pastureId), body, response); err != nil {
|
|
|
zaplog.Error("SearchFeedStatistics",
|
|
|
zap.Any("pastureId", pastureId),
|
|
@@ -429,13 +430,9 @@ func (s *StoreEntry) SearchFeedStatistics(ctx context.Context, req *operationPb.
|
|
|
}
|
|
|
|
|
|
if response.Code == http.StatusOK && response.Data.List != nil {
|
|
|
- if req.ApiName == "getFeedEfficiencyFT" {
|
|
|
- feedStatisticsConversions := FeedStatisticsConversions(response.Data.List)
|
|
|
- feedStatisticsConversions.PastureName = groupPasture.Name
|
|
|
- res.Data.List[groupPasture.Name] = feedStatisticsConversions
|
|
|
- } else {
|
|
|
- res.Data.List[groupPasture.Name] = response.Data.List
|
|
|
- }
|
|
|
+ feedStatisticsConversions := FeedStatisticsConversions(response.Data.List)
|
|
|
+ feedStatisticsConversions.PastureName = groupPasture.Name
|
|
|
+ res.Data.List[groupPasture.Name] = feedStatisticsConversions
|
|
|
}
|
|
|
}(v)
|
|
|
}
|