feat(crypto策略): 支持巴菲特策略纯 rawMessage 信号推送
Motivation: 新增巴菲特激进/稳健策略(PUTEJJ/PUTEWJ)的跟单推送能力。该类信号仅有 rawMessage、无 action 字段,需按原文直接推送,并过滤启动文案、本地化时间字段。 Changes: * 支持无 action 的纯 rawMessage 信号,映射为 trade.message 事件 * 新增 not_contains 条件操作符,用于过滤启动文案 * 新增 replace 模板函数,将 Time: 替换为推送时间: * 补充巴菲特策略模板、规则与渠道配置文档
This commit is contained in:
@@ -46,6 +46,11 @@ func evaluateOne(c model.Condition, data map[string]interface{}) bool {
|
||||
return false
|
||||
}
|
||||
return strings.Contains(fmt.Sprintf("%v", fieldVal), c.Value)
|
||||
case "not_contains":
|
||||
if !fieldExists {
|
||||
return true
|
||||
}
|
||||
return !strings.Contains(fmt.Sprintf("%v", fieldVal), c.Value)
|
||||
case "gt", "gte", "lt", "lte":
|
||||
if !fieldExists {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user