|
@@ -539,7 +539,7 @@ func (s *StoreEntry) CategoryDistribution(ctx context.Context, url string, req *
|
|
defer wg.Done()
|
|
defer wg.Done()
|
|
res := &model.PastureCommonResponse{}
|
|
res := &model.PastureCommonResponse{}
|
|
req.PastureId = int32(data.Id)
|
|
req.PastureId = int32(data.Id)
|
|
- if err = s.PastureHttpClient(ctx, url, int64(data.Id), req, res); err != nil {
|
|
|
|
|
|
+ if err = s.PastureHttpClient(ctx, url, data.Id, req, res); err != nil {
|
|
zaplog.Error("CategoryDistribution",
|
|
zaplog.Error("CategoryDistribution",
|
|
zap.Any("url", url),
|
|
zap.Any("url", url),
|
|
zap.Any("err", err),
|
|
zap.Any("err", err),
|
|
@@ -555,7 +555,6 @@ func (s *StoreEntry) CategoryDistribution(ctx context.Context, url string, req *
|
|
zap.Any("res", res),
|
|
zap.Any("res", res),
|
|
)
|
|
)
|
|
}
|
|
}
|
|
-
|
|
|
|
}(v)
|
|
}(v)
|
|
}
|
|
}
|
|
wg.Wait()
|
|
wg.Wait()
|
|
@@ -681,7 +680,7 @@ func (s *StoreEntry) SearchForageList(ctx context.Context, req *operationPb.Sear
|
|
pref.Where("jump_delay = ?", req.JumpDelay)
|
|
pref.Where("jump_delay = ?", req.JumpDelay)
|
|
}
|
|
}
|
|
|
|
|
|
- if err := pref.Order("sort").Count(&count).Limit(int(req.Pagination.PageSize)).Offset(int(req.Pagination.PageOffset)).
|
|
|
|
|
|
+ if err := pref.Order("id DESC").Count(&count).Limit(int(req.Pagination.PageSize)).Offset(int(req.Pagination.PageOffset)).
|
|
Find(&forage).Error; err != nil {
|
|
Find(&forage).Error; err != nil {
|
|
return nil, xerr.WithStack(err)
|
|
return nil, xerr.WithStack(err)
|
|
}
|
|
}
|