perf(orders): conditional Address JOIN и отдельный stats endpoint - #469
Open
Ibochkarev wants to merge 1 commit into
Open
perf(orders): conditional Address JOIN и отдельный stats endpoint#469Ibochkarev wants to merge 1 commit into
Ibochkarev wants to merge 1 commit into
Conversation
Ibochkarev
force-pushed
the
fix/issue-353
branch
from
July 29, 2026 02:05
89e5161 to
04b9b32
Compare
Skip Address JOIN when grid/filters/search do not need it; move stats off the list hot path to GET /api/mgr/orders/stats with include_stats opt-in.
Ibochkarev
force-pushed
the
fix/issue-353
branch
from
July 29, 2026 11:31
04b9b32 to
402a812
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
Оптимизация manager list заказов (#353):
ManagerOrderListQueryService::needsAddressJoin()включает JOIN только при search query, address-фильтрах (filter_customer|email|phone), сортировке по address-полям или видимых колонках grid (customer,email, …).getListбольше не вызываетgetOrdersStats()по умолчанию. Stats доступны черезGET /api/mgr/orders/stats(те же filter-параметры, без pagination) или legacy?include_stats=1на list.loadOrders()+loadOrderStats()параллельно черезrefreshGrid(); shape строк списка не меняется.Тип изменений
Связанные Issues
Closes #353
Refs #338
Как это было протестировано?
Конфигурация тестирования:
API контракт stats
GET /api/mgr/orders{ results, total }(+ optionalstatsприinclude_stats=1)GET /api/mgr/orders/stats{ month_sum, month_total }(formatted strings, как раньше в list)Фильтры: те же
filter_*,show_drafts, direct keys — безstart/limit/sort.Чеклист
Services/Order/ManagerOrderListQueryServiceДополнительные заметки
customerJOIN остаётся (нужны поля дляformatOrder).OrdersController([Feature] Распилить OrdersController: thin controller + сервисы (<1000 LOC) #338) — follow-up; сервис закладывает основу дляManagerOrderQueryService.