This commit is contained in:
Cauchy
2023-10-24 17:25:44 +08:00
parent 7b9c6424ea
commit 36374dd454
9 changed files with 42 additions and 17 deletions

View File

@@ -257,13 +257,13 @@ public class BuyOrderController {
buyOrder.setProvince(vo.getProvince());
buyOrder.setCity(vo.getCity());
buyOrder.setDistrict(vo.getCounty());
buyOrder.setAddress(vo.getDetailAddress());
buyOrder.setAddress(userAddress.getDetailAddress());
buyOrderService.save(buyOrder);
for (BuyOrderProduct buyOrderDetail : buyOrderProductList) {
buyOrderDetail.setOrderId(buyOrder.getId());
for (BuyOrderProduct buyOrderProduct : buyOrderProductList) {
buyOrderProduct.setOrderId(buyOrder.getId());
if (Constants.BUY_TYPE_CART.equals(buyOrder.getBuyType())) {
handleBuyCart(buyOrder, buyOrderDetail);
handleBuyCart(buyOrder, buyOrderProduct);
}
}
buyOrderProductService.saveBatch(buyOrderProductList);