fix 修复删除最便宜的方案后,成本不变的bug

This commit is contained in:
timerzz 2024-06-15 23:48:53 +08:00
parent 24baf0b387
commit 63f1bd6930

View File

@ -96,6 +96,7 @@ func (p *Product) fillPriceStatus(tx *gorm.DB) {
func (p *Product) CalCNY(calculateProcess []CalculateProcess) {
env := p.Env()
var calculateStrings = make([]string, 0, len(calculateProcess))
p.CNYPrice = 0
for _, c := range calculateProcess {
process, price := c.Calculate(env)
if process != "" {