|
|
@@ -1526,32 +1526,33 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
.set(GroupsRelation::getIsFrozen, Boolean.FALSE)
|
|
|
.eq(GroupsRelation::getId, netflixRelationView.getId())
|
|
|
.eq(GroupsRelation::getIsFrozen, Boolean.TRUE));
|
|
|
- if (update > 0) {
|
|
|
- try {
|
|
|
- //获取同规格的车票
|
|
|
- Long skuId = netflixRelationView.getSkuId();
|
|
|
- GoodsDonSku sku = goodsDonSkuMapper.selectById(skuId);
|
|
|
- GroupsRelation relation = getRelation(null, userId, sku, null);
|
|
|
- if (relation == null) {
|
|
|
- //还原冻结状态
|
|
|
- groupsRelationMapper.update(null, Wrappers.lambdaUpdate(GroupsRelation.class)
|
|
|
- .set(GroupsRelation::getIsFrozen, Boolean.TRUE)
|
|
|
- .eq(GroupsRelation::getId, netflixRelationView.getId())
|
|
|
- .eq(GroupsRelation::getIsFrozen, Boolean.FALSE));
|
|
|
- }
|
|
|
- if (relation != null) {
|
|
|
- Long groupsId = relation.getGroupsId();
|
|
|
- GroupsTrips groupsTrips = groupsMapper.selectById(groupsId);
|
|
|
- //已发车
|
|
|
- if (groupsTrips.getStatus() == GroupsTrips.Status.validity) {
|
|
|
- resetUserTicket(netflixRelationView, relation);
|
|
|
- recoverResp.setIsReset(Boolean.TRUE);
|
|
|
- return recoverResp;
|
|
|
- }
|
|
|
+ if (update == 0) {
|
|
|
+ throw BusinessRuntimeException.getInstance("申请恢复账号失败,请重试");
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ //获取同规格的车票
|
|
|
+ Long skuId = netflixRelationView.getSkuId();
|
|
|
+ GoodsDonSku sku = goodsDonSkuMapper.selectById(skuId);
|
|
|
+ GroupsRelation relation = getRelation(null, userId, sku, null);
|
|
|
+ if (relation == null) {
|
|
|
+ //还原冻结状态
|
|
|
+ groupsRelationMapper.update(null, Wrappers.lambdaUpdate(GroupsRelation.class)
|
|
|
+ .set(GroupsRelation::getIsFrozen, Boolean.TRUE)
|
|
|
+ .eq(GroupsRelation::getId, netflixRelationView.getId())
|
|
|
+ .eq(GroupsRelation::getIsFrozen, Boolean.FALSE));
|
|
|
+ }
|
|
|
+ if (relation != null) {
|
|
|
+ Long groupsId = relation.getGroupsId();
|
|
|
+ GroupsTrips groupsTrips = groupsMapper.selectById(groupsId);
|
|
|
+ //已发车
|
|
|
+ if (groupsTrips.getStatus() == GroupsTrips.Status.validity) {
|
|
|
+ resetUserTicket(netflixRelationView, relation);
|
|
|
+ recoverResp.setIsReset(Boolean.TRUE);
|
|
|
+ return recoverResp;
|
|
|
}
|
|
|
- } catch (Exception e) {
|
|
|
- throw BusinessRuntimeException.getInstance("申请恢复账号失败,请重试");
|
|
|
}
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw BusinessRuntimeException.getInstance("申请恢复账号失败,请重试");
|
|
|
}
|
|
|
}
|
|
|
Date expiryTime = netflixRelationView.getExpiryTime();
|