zoujiajian 9 luni în urmă
părinte
comite
08b4005006

+ 2 - 2
netflix-web/src/main/java/com/cyksj/web/controller/manage/CmsOrderController.java

@@ -1263,9 +1263,9 @@ public class CmsOrderController {
 		}
 		OrderDonUserRefundDetailView orderDonUserRefundDetailView = beanSearcher.searchFirst(OrderDonUserRefundDetailView.class, builder.build());
 		OrderDon orderDon = orderDonMapper.selectById(orderId);
-		if (orderDon != null && orderDon.getRelationId() > 0) {
+		if (orderDon != null && orderDon.getRelationId() != null && orderDon.getRelationId() > 0) {
 			GroupsRelation relation = relationMapper.selectOne(Wrappers.lambdaQuery(GroupsRelation.class).eq(GroupsRelation::getId, orderDon.getRelationId()).in(GroupsRelation::getUserId, userIdList));
-			if (relation.getExpiryTime() != null && relation.getExpiryTime().after(DateTime.now())) {
+			if (relation != null && relation.getExpiryTime() != null && relation.getExpiryTime().after(DateTime.now())) {
 				Long remainDays = DateUtil.betweenDay(DateTime.now(), relation.getExpiryTime(), false);
 				orderDonUserRefundDetailView.setRemainsDays(remainDays.intValue());
 				orderDonUserRefundDetailView.setCompensationDays(relation.getCompensationDays());