Commit fb689e1a authored by 李世星's avatar 李世星

fix(优化钉钉发送报文中-空map-显示{}问题): 202302141036

parent 65e7f2e2
Pipeline #16307 passed with stage
in 0 seconds
......@@ -79,8 +79,13 @@ func pluginNotice(msg interface{}) string {
for key, value := range mateData.Data {
t := reflect.TypeOf(value).Kind().String()
if t == "map" {
s, _ := json.Marshal(value)
value = string(s)
if reflect.ValueOf(value).Len() < 1 {
value = ""
} else {
s, _ := json.Marshal(value)
value = string(s)
}
}
if t == "float64" {
value = fmt.Sprintf("%.0f", value)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment