|
@@ -420,14 +420,19 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
|
|
throw new BackendRuntimeException(ExceptionEnum.EXCEPTION_COUPON_INVALID);
|
|
|
}
|
|
|
if(ObjectUtils.isNotEmpty(listingProductVO.getDisplayPrice())){
|
|
|
- if (prize.getActivityType().equals("1")&&listingProductVO.getDisplayPrice().compareTo(BigDecimal.valueOf(79.99))<0){
|
|
|
+ if (prize.getActivityType().equals("1")){
|
|
|
throw new BackendRuntimeException(ExceptionEnum.EXCEPTION_COUPON_INVALID);
|
|
|
}
|
|
|
listingProductVO.setDisplayPrice(listingProductVO.getDisplayPrice().subtract(prize.getUsdPrice()));
|
|
|
listingProductVO.setCnyDisplayPrice(listingProductVO.getCnyDisplayPrice().subtract(prize.getCnyPrice()));
|
|
|
}else{
|
|
|
- if (prize.getActivityType().equals("1")&&listingProductVO.getPrice().compareTo(BigDecimal.valueOf(79.99))<0){
|
|
|
- throw new BackendRuntimeException(ExceptionEnum.EXCEPTION_COUPON_INVALID);
|
|
|
+ if ("1".equals(prize.getActivityType())) {
|
|
|
+ if (listingProductVO.getDiscountType()==1) {
|
|
|
+ throw new BackendRuntimeException(ExceptionEnum.EXCEPTION_COUPON_INVALID);
|
|
|
+ }
|
|
|
+ if (listingProductVO.getPrice().compareTo(BigDecimal.valueOf(79.99)) < 0) {
|
|
|
+ throw new BackendRuntimeException(ExceptionEnum.EXCEPTION_COUPON_INVALID);
|
|
|
+ }
|
|
|
}
|
|
|
listingProductVO.setDisplayPrice(listingProductVO.getPrice().subtract(prize.getUsdPrice()));
|
|
|
listingProductVO.setCnyDisplayPrice(listingProductVO.getCnyPrice().subtract(prize.getCnyPrice()));
|