|
|
@@ -177,7 +177,7 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
|
|
|
GroupsRelation relation = null;
|
|
|
if (groups == null) {
|
|
|
//新增车位 并关联
|
|
|
- createNewGroupTripsAndRelation(sku, groups, relation);
|
|
|
+ relation = createNewGroupTripsAndRelation(sku, groups, relation);
|
|
|
} else {
|
|
|
//寻找快满编车队进行占座
|
|
|
relation = groupsRelationMapper.selectOne(Wrappers.lambdaQuery(GroupsRelation.class)
|
|
|
@@ -189,7 +189,7 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
|
|
|
);
|
|
|
//如果占位失败 新增车位并关联
|
|
|
if (relation == null) {
|
|
|
- createNewGroupTripsAndRelation(sku, groups, relation);
|
|
|
+ relation = createNewGroupTripsAndRelation(sku, groups, relation);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -265,7 +265,7 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
|
|
|
/**
|
|
|
* 新增新车位并关联车位
|
|
|
*/
|
|
|
- private void createNewGroupTripsAndRelation(GoodsDonSku sku, GroupsTrips groups, GroupsRelation relation) {
|
|
|
+ private GroupsRelation createNewGroupTripsAndRelation(GoodsDonSku sku, GroupsTrips groups, GroupsRelation relation) {
|
|
|
//通过兑换码兑换车票 新增车位
|
|
|
if (groups == null) {
|
|
|
groups = new GroupsTrips();
|
|
|
@@ -293,5 +293,6 @@ public class ExchangeCodeServiceImpl extends ServiceImpl<ExchangeCodeMapper, Exc
|
|
|
groupsRelation.setStatus(GroupsRelation.Status.none);
|
|
|
groupsRelationMapper.insert(groupsRelation);
|
|
|
}
|
|
|
+ return relation;
|
|
|
}
|
|
|
}
|