|
|
@@ -767,7 +767,7 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
relationClearService.clearTicket(relation, source);
|
|
|
|
|
|
//兜底处理 多余车票
|
|
|
- clearOtherChangeTicket(userId, relationId, newRelation);
|
|
|
+ clearOtherChangeTicket(userId, relationId, newRelation, orderDon.getSkuId());
|
|
|
|
|
|
//奈飞车票
|
|
|
if (orderDon.getGoodsId() == 1) {
|
|
|
@@ -1555,7 +1555,7 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
/**
|
|
|
* 清除多余车票
|
|
|
*/
|
|
|
- private void clearOtherChangeTicket(Long userId, Long relationId, GroupsRelation newRelation) {
|
|
|
+ private void clearOtherChangeTicket(Long userId, Long relationId, GroupsRelation newRelation, Long skuId) {
|
|
|
UserTicketClearedRecord userTicketClearedRecord = userTicketClearedRecordMapper.selectOne(Wrappers.lambdaQuery(UserTicketClearedRecord.class)
|
|
|
.eq(UserTicketClearedRecord::getUserId, userId)
|
|
|
.eq(UserTicketClearedRecord::getRelationId, relationId)
|
|
|
@@ -1570,6 +1570,12 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
.eq(GroupsRelation::getStartTime, newRelation.getStartTime())
|
|
|
.eq(GroupsRelation::getExpiryTime, newRelation.getExpiryTime()));
|
|
|
others.forEach(r -> {
|
|
|
+ Long groupsId = r.getGroupsId();
|
|
|
+ GroupsTrips groupsTrips = groupsMapper.selectById(groupsId);
|
|
|
+ //排除 非同规格车票
|
|
|
+ if (!skuId.equals(groupsTrips.getSkuId())) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
Long rid = r.getId();
|
|
|
Integer selectCount = orderDonMapper.selectCount(Wrappers.lambdaQuery(OrderDon.class)
|
|
|
.eq(OrderDon::getUserId, userId)
|