同步计费优化

This commit is contained in:
luojiaquan
2026-10-16 10:59:59 +08:00
parent 2689138b6a
commit 132688b9cf
10 changed files with 305 additions and 109 deletions
@@ -136,9 +136,10 @@ public class TabOrderMonitorController extends BaseController
@PostMapping("/syncByFilter")
public AjaxResult syncByFilter(@RequestBody TabOrderMonitorQuery query)
{
if (!hasRequiredFilters(query))
// 与列表查询同口径:有单号即可同步;无单号时必须客户 + 提货时间
if (!hasListFilters(query))
{
return error("customerCodes and pickup time required");
return error("orderIdentifiers or (customer and pickup time) required");
}
customerKeywordResolver.resolve(query);
// 含大批量单号时,异步任务启动时会自行分批收集,这里不预先 count,避免重复全量扫描
@@ -26,8 +26,10 @@ bms:
# Max messages popped per tick; processed by consumer-threads pool
consumer-batch-size: 32
consumer-threads: 8
# Concurrent threads for monitor order-source sync (2~16)
order-source-sync-threads: 8
# Concurrent threads for monitor order-source sync (2~16).
# 同步已直接复用订单行(跳过每单 Oracle 公网查询),瓶颈在 MySQL 计费写入,
# 同客户行锁冲突由 billWithDbRetry 3 次重试兜底,16 路实测吞吐最高。
order-source-sync-threads: 16
oracle:
# SLAVE datasource Oracle main-order table (schema.table allowed)
order-table: WEISHI_USER.TAB_ORDER