!209 修复批发商品订单下单时,订单单项价格错误问题

Merge pull request !209 from OceansDeep/feature/pg
This commit is contained in:
OceansDeep 2022-07-12 09:16:09 +00:00 committed by Gitee
commit d17cb4ce96
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -261,9 +261,15 @@ public class CheckDataRender implements CartRenderStep {
// 将符合规则的商品设置批发价格
if (Boolean.TRUE.equals(i.getChecked())) {
i.setPurchasePrice(match.getPrice());
i.getGoodsSku().setPrice(match.getPrice());
i.getGoodsSku().setCost(match.getPrice());
i.setUtilPrice(match.getPrice());
i.setSubTotal(CurrencyUtil.mul(i.getPurchasePrice(), i.getNum()));
} else {
i.setPurchasePrice(wholesaleService.match(k, fSum).getPrice());
i.getGoodsSku().setPrice(i.getPurchasePrice());
i.getGoodsSku().setCost(i.getPurchasePrice());
i.setUtilPrice(i.getPurchasePrice());
i.setSubTotal(CurrencyUtil.mul(i.getPurchasePrice(), i.getNum()));
}
});