|
|
@@ -753,6 +753,7 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
if (relation.getIsFrozen()) {
|
|
|
throw BusinessRuntimeException.getInstance("用户车票冻结中,无法更换车票");
|
|
|
}
|
|
|
+ Integer reservedDays = relation.getReservedDays();
|
|
|
String key = RedisService.key.NETFLIX_CHANGE_TICKET_KEY.getName() + relationId;
|
|
|
if (!redisService.setNx(key, relationId, RedisService.key.NETFLIX_CHANGE_TICKET_KEY.getTimeout())) {
|
|
|
throw BusinessRuntimeException.getInstance("正在更换车票中..");
|
|
|
@@ -968,6 +969,10 @@ public class CmsOrderDonServiceImpl extends ServiceImpl<OrderDonMapper,OrderDon>
|
|
|
relationMapper.updateById(newRelation);
|
|
|
}
|
|
|
}
|
|
|
+ if (reservedDays != null) {
|
|
|
+ newRelation.setExpiryTime(DateUtil.offsetDay(DateTime.now(), reservedDays));
|
|
|
+ relationMapper.updateById(newRelation);
|
|
|
+ }
|
|
|
} finally {
|
|
|
if (redisService.hasKey(key)) {
|
|
|
redisService.del(key);
|