|
@@ -35,7 +35,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
|
+import java.util.Optional;
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
*项目名: netflix
|
|
*项目名: netflix
|
|
@@ -88,10 +88,7 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
.build());
|
|
.build());
|
|
|
//过滤邀请制、已失效的车位
|
|
//过滤邀请制、已失效的车位
|
|
|
DateTime now = DateTime.now();
|
|
DateTime now = DateTime.now();
|
|
|
- List<RenewalView> collect = list.stream().filter(ticket -> {
|
|
|
|
|
- if (ticket.getExpiryTime() != null && ticket.getExpiryTime().before(now)) {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ list.stream().forEach(ticket -> {
|
|
|
if (ticket.getGoodsId() == 18 && ticket.getSkuNum() > 1) {
|
|
if (ticket.getGoodsId() == 18 && ticket.getSkuNum() > 1) {
|
|
|
ticket.setPassword(null);
|
|
ticket.setPassword(null);
|
|
|
}
|
|
}
|
|
@@ -131,14 +128,21 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
}
|
|
}
|
|
|
ticket.setRemainDays(remainDays);
|
|
ticket.setRemainDays(remainDays);
|
|
|
}
|
|
}
|
|
|
|
|
+ if (list.size() > 1 && ticket.getGoodsId() != 18) {
|
|
|
|
|
+ OrderDon orderDon = orderDonMapper.selectOne(Wrappers.lambdaQuery(OrderDon.class)
|
|
|
|
|
+ .eq(OrderDon::getRelationId, ticket.getRelationId())
|
|
|
|
|
+ .eq(OrderDon::getUserId, ticket.getUserId())
|
|
|
|
|
+ .orderByDesc(OrderDon::getId)
|
|
|
|
|
+ .last("limit 1"));
|
|
|
|
|
+ ticket.setPayTime(Optional.ofNullable(orderDon.getPayTime()).orElse(orderDon.getCreatedTime()));
|
|
|
|
|
+ }
|
|
|
List<GroupsRelationUserView> relationUserViews = groupsRelationMapper.getUserRelationUserViews(ticket.getGroupId(), ticket.getRelationId(), ticket.getUserId(), List.of(GroupsRelation.Status.validity, GroupsRelation.Status.outside));
|
|
List<GroupsRelationUserView> relationUserViews = groupsRelationMapper.getUserRelationUserViews(ticket.getGroupId(), ticket.getRelationId(), ticket.getUserId(), List.of(GroupsRelation.Status.validity, GroupsRelation.Status.outside));
|
|
|
ticket.setRelationViews(relationUserViews);
|
|
ticket.setRelationViews(relationUserViews);
|
|
|
if (ticket.getExpiryTime() != null) {
|
|
if (ticket.getExpiryTime() != null) {
|
|
|
ticket.setExpiryTimeStr(DateUtil.format(ticket.getExpiryTime(), "yyyy-MM-dd"));
|
|
ticket.setExpiryTimeStr(DateUtil.format(ticket.getExpiryTime(), "yyyy-MM-dd"));
|
|
|
}
|
|
}
|
|
|
- return true;
|
|
|
|
|
- }).collect(Collectors.toList());
|
|
|
|
|
- return collect;
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ return list;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|