|
|
@@ -194,6 +194,10 @@ public class ProductOrderService {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // 产品级最小购买数量检查(当没有SKU或SKU不限制时)
|
|
|
+ if (item.getSkuId() == null && product.getMinQuantity() != null && item.getQuantity() < product.getMinQuantity()) {
|
|
|
+ return Result.error(product.getName() + " 最低需购买" + product.getMinQuantity() + "件");
|
|
|
+ }
|
|
|
totalAmount += unitPrice * item.getQuantity();
|
|
|
totalQuantity += item.getQuantity();
|
|
|
if (firstProduct == null) {
|
|
|
@@ -522,12 +526,8 @@ public class ProductOrderService {
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error("同步AfterSalesRequest状态失败: orderNo={}, status={}", orderNo, status, e);
|
|
|
- }
|
|
|
- // 产品级最小购买数量检查
|
|
|
- if (item.getSkuId() == null && product.getMinQuantity() != null && item.getQuantity() < product.getMinQuantity()) {
|
|
|
- return Result.error(product.getName() + " 最低需购买" + product.getMinQuantity() + "件");
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
public Result<List<ProductOrderDTO>> myOrders(Long buyerId, String status) {
|
|
|
return myOrders(buyerId, status, null);
|