修改增值服务保存逻辑-1

This commit is contained in:
孙肖扬 2025-06-20 15:34:55 +08:00
parent 952caaaf91
commit a6d315a283

View File

@ -170,7 +170,7 @@ func SaveValueAddService(in *bundle.ValueAddServiceLang) (res *bundle.SaveRespon
if option.Num < 0 || option.Num > 99 { if option.Num < 0 || option.Num > 99 {
return res, errors.New("数量参数需为0-99") return res, errors.New("数量参数需为0-99")
} }
if price > originalPrice { if in.PriceMode == 1 && price > originalPrice {
return res, errors.New("优惠单价需小于等于原价") return res, errors.New("优惠单价需小于等于原价")
} }
options = append(options, &model.PriceOption{ options = append(options, &model.PriceOption{