1.fix
This commit is contained in:
2026-05-12 19:52:53 +08:00
parent c2924c03e4
commit 7a19eef5f5
2 changed files with 3 additions and 6 deletions

View File

@@ -32,7 +32,4 @@ public class CreateMallOrderRequest implements Serializable {
@NotNull(message = "无效支付方式") @NotNull(message = "无效支付方式")
private Integer paymentType; private Integer paymentType;
@NotNull(message = "无效标识")
private Boolean isOfflinePayment;
} }

View File

@@ -206,7 +206,7 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
if (product.getStatus() != 1) { if (product.getStatus() != 1) {
throw new ServiceException("商品已下架"); throw new ServiceException("商品已下架");
} }
if (!request.getIsOfflinePayment() && product.getRetailPrice().compareTo(BigDecimal.ONE) > 0) { if (request.getPaymentType() == PaymentType.ALI.getCode() || request.getPaymentType() == PaymentType.WECHAT.getCode()){
discount = BigDecimal.valueOf(new Random().nextInt(99) + 1, 2); discount = BigDecimal.valueOf(new Random().nextInt(99) + 1, 2);
} }
CommonUserOrderEntity order = AppCommonConvert.INSTANCE.convertMallProductToOrder(request, product); CommonUserOrderEntity order = AppCommonConvert.INSTANCE.convertMallProductToOrder(request, product);
@@ -229,7 +229,7 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
BigDecimal discount = BigDecimal.ZERO; BigDecimal discount = BigDecimal.ZERO;
String orderType = request.getOrderType().toUpperCase(); String orderType = request.getOrderType().toUpperCase();
if (!request.getIsOfflinePayment()) { if (request.getPaymentType() == PaymentType.ALI.getCode() || request.getPaymentType() == PaymentType.WECHAT.getCode()){
discount = BigDecimal.valueOf(new Random().nextInt(99) + 1, 2); discount = BigDecimal.valueOf(new Random().nextInt(99) + 1, 2);
} }
@@ -497,7 +497,7 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
public CreateOrderResponse createEcoOrder(CreateMallOrderRequest request) { public CreateOrderResponse createEcoOrder(CreateMallOrderRequest request) {
BigDecimal discount = BigDecimal.ZERO; BigDecimal discount = BigDecimal.ZERO;
String orderType = request.getOrderType().toUpperCase(); String orderType = request.getOrderType().toUpperCase();
if (!request.getIsOfflinePayment()) { if (request.getPaymentType() == PaymentType.ALI.getCode() || request.getPaymentType() == PaymentType.WECHAT.getCode()){
discount = BigDecimal.valueOf(new Random().nextInt(99) + 1, 2); discount = BigDecimal.valueOf(new Random().nextInt(99) + 1, 2);
} }
if (!BusinessModule.fromCodeIgnoreCaseOrNull(orderType).equals(BusinessModule.ECOSYSTEM_PRODUCT)) { if (!BusinessModule.fromCodeIgnoreCaseOrNull(orderType).equals(BusinessModule.ECOSYSTEM_PRODUCT)) {