|
|
@@ -2174,11 +2174,15 @@ public class OrderServiceImpl extends ServiceImpl<AppOrderMapper, AppOrder> impl
|
|
|
AppOrderProInfo appOrderProInfo = appOrderProInfoMapper.selectById(refundOrderProInfoId);
|
|
|
String productId = appOrderProInfo.getProductId();
|
|
|
AppSitePriceRules sitePriceRules = appSitePriceRulesMapper.selectById(productId);
|
|
|
- Instant originalInstant = sitePriceRules.getStartTime().toInstant();
|
|
|
- Instant time = originalInstant.minusSeconds(appSitePlace.getEarlyRefundTime() * 60);
|
|
|
- Instant now = Instant.now();
|
|
|
- if (!now.isBefore(time)) {
|
|
|
- throw new JeecgBootException("商品:" + appOrderProInfo.getProductName() + " 已超过可退时间,无法进行退款!");
|
|
|
+ if(ObjectUtil.isNotEmpty(sitePriceRules)){
|
|
|
+ if(Objects.equals(sitePriceRules.getType(), CommonConstant.ORDER_PRO_INFO_TYPE_1)){
|
|
|
+ Instant originalInstant = sitePriceRules.getStartTime().toInstant();
|
|
|
+ Instant time = originalInstant.minusSeconds(appSitePlace.getEarlyRefundTime() * 60);
|
|
|
+ Instant now = Instant.now();
|
|
|
+ if (!now.isBefore(time)) {
|
|
|
+ throw new JeecgBootException("商品:" + appOrderProInfo.getProductName() + " 已超过可退时间,无法进行退款!");
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|