feat 把价格改为float64

This commit is contained in:
timerzz 2024-09-01 16:28:17 +08:00
parent fd1f982cd8
commit 402be86404

View File

@ -37,7 +37,7 @@ func (c *CalculateProcess) Run(env map[string]float64) (string, float64) {
return "", 0 return "", 0
} }
} }
program, err := expr.Compile(c.Process, expr.AsInt()) program, err := expr.Compile(c.Process, expr.AsFloat64())
if err != nil { if err != nil {
return fmt.Sprintf("【%s】 process compile error: %v", c.Name, err), 0 return fmt.Sprintf("【%s】 process compile error: %v", c.Name, err), 0
} }