fix(exporter): 修正易码通订单 reseller_id_eq 过滤器逻辑
- 易码通订单中 reseller_id_eq 不再转为 merchant_id_in 与 creator_in 做 OR 逻辑 - 保留 reseller_id_eq 作为单独的 WHERE 条件,不做合并删除 - 移除无效的过滤器跳过逻辑,优化过滤器处理流程 - 修改立减金相关标签名称,"未核销过期时间"改为"立减金过期时间"
This commit is contained in:
parent
41e00e3fd6
commit
bc6bc3945e
|
|
@ -527,16 +527,13 @@ func BuildCountSQL(req BuildRequest, whitelist map[string]bool) (string, []inter
|
|||
delete(req.Filters, "merchant_id_eq")
|
||||
}
|
||||
}
|
||||
// 易码通订单: reseller_id_eq 不再转为 merchant_id_in 与 creator_in 做 OR,而是作为单独的 WHERE 条件
|
||||
if req.Datasource == "ymt" && (req.MainTable == "order" || req.MainTable == "order_info") {
|
||||
if v, ok := req.Filters["reseller_id_eq"]; ok {
|
||||
if isZeroID(v) {
|
||||
delete(req.Filters, "reseller_id_eq")
|
||||
} else {
|
||||
if _, has := req.Filters["merchant_id_in"]; !has {
|
||||
req.Filters["merchant_id_in"] = []interface{}{v}
|
||||
}
|
||||
delete(req.Filters, "reseller_id_eq")
|
||||
}
|
||||
// 不再转换为 merchant_id_in,保留 reseller_id_eq 作为单独 WHERE 条件
|
||||
}
|
||||
}
|
||||
// Handle creator_in and merchant_id_in with OR logic if both exist
|
||||
|
|
@ -629,11 +626,6 @@ func BuildCountSQL(req BuildRequest, whitelist map[string]bool) (string, []inter
|
|||
if k == "creator_in" || k == "merchant_id_in" {
|
||||
continue
|
||||
}
|
||||
if k == "reseller_id_eq" {
|
||||
if _, has := req.Filters["merchant_id_in"]; has {
|
||||
continue
|
||||
}
|
||||
}
|
||||
if k == "plan_id_eq" && utils.ToString(v) == "0" {
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ func AllLabels() map[string]string {
|
|||
"order_voucher.refund_time": "退款时间",
|
||||
"order_voucher.status_modify_time": "状态更新时间",
|
||||
"order_voucher.overdue_time": "过期时间",
|
||||
"order_voucher.expire_time": "未核销过期时间",
|
||||
"order_voucher.expire_time": "立减金过期时间",
|
||||
"order_voucher.refund_amount": "退款金额",
|
||||
"order_voucher.official_price": "立减金订单.官方价",
|
||||
"order_voucher.account_no": "账户号",
|
||||
|
|
|
|||
Loading…
Reference in New Issue