update:
1.fix
This commit is contained in:
@@ -32,7 +32,4 @@ public class CreateMallOrderRequest implements Serializable {
|
||||
@NotNull(message = "无效支付方式")
|
||||
private Integer paymentType;
|
||||
|
||||
@NotNull(message = "无效标识")
|
||||
private Boolean isOfflinePayment;
|
||||
|
||||
}
|
||||
|
||||
@@ -206,7 +206,7 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
|
||||
if (product.getStatus() != 1) {
|
||||
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);
|
||||
}
|
||||
CommonUserOrderEntity order = AppCommonConvert.INSTANCE.convertMallProductToOrder(request, product);
|
||||
@@ -229,7 +229,7 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
|
||||
|
||||
BigDecimal discount = BigDecimal.ZERO;
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -497,7 +497,7 @@ public class CommonUserOrderServiceImpl extends ServiceImpl<CommonUserOrderMappe
|
||||
public CreateOrderResponse createEcoOrder(CreateMallOrderRequest request) {
|
||||
BigDecimal discount = BigDecimal.ZERO;
|
||||
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);
|
||||
}
|
||||
if (!BusinessModule.fromCodeIgnoreCaseOrNull(orderType).equals(BusinessModule.ECOSYSTEM_PRODUCT)) {
|
||||
|
||||
Reference in New Issue
Block a user