Compare commits

..

No commits in common. "44f40ee10f2bec85ced1fa40de42894ca5fb7289" and "54ea18edc4d109ada3563af7c226d4092076f6d5" have entirely different histories.

2 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ func SaveValueAddService(in *bundle.ValueAddServiceLang) (res *bundle.SaveRespon
return res, errors.New("语言不能为空") return res, errors.New("语言不能为空")
} }
var options model.PriceOptions var options model.PriceOptions
if in.PriceMode == 1 && in.OriginalPrice == "" { if in.OriginalPrice == "" {
return res, errors.New("原价不能为空") return res, errors.New("原价不能为空")
} }
originalPrice, parseErr := strconv.ParseFloat(in.OriginalPrice, 32) originalPrice, parseErr := strconv.ParseFloat(in.OriginalPrice, 32)

View File

@ -166,7 +166,7 @@ func (options PriceOptions) CalculatePrice(priceMode, target int32) (float32, er
} }
if match { if match {
switch priceMode { //1 单价模式 switch priceMode {
case 1: case 1:
return float32(target) * opt.Price, nil return float32(target) * opt.Price, nil
case 2: case 2: