|
@@ -254,10 +254,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
- if (goodsDon.getId() != 26) {
|
|
|
|
|
- //寻找差不多过期时间规格的车位
|
|
|
|
|
- relation = groupRelationFrontService.getSimilarExpiredGroupRelation(sku.getId(), sku.getMonths(), null);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ //寻找差不多过期时间规格的车位
|
|
|
|
|
+ relation = groupRelationFrontService.getSimilarExpiredGroupRelation(sku.getId(), sku.getMonths(), null);
|
|
|
if (relation == null) {
|
|
if (relation == null) {
|
|
|
//TODO 如果没指定座位,等待逻辑确认
|
|
//TODO 如果没指定座位,等待逻辑确认
|
|
|
LambdaQueryWrapper<GroupsTrips> queryWrapper = Wrappers.lambdaQuery(GroupsTrips.class)
|
|
LambdaQueryWrapper<GroupsTrips> queryWrapper = Wrappers.lambdaQuery(GroupsTrips.class)
|
|
@@ -265,16 +263,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
.gt(GroupsTrips::getAvailableNum, 0).last("limit 1")
|
|
.gt(GroupsTrips::getAvailableNum, 0).last("limit 1")
|
|
|
.ne(GroupsTrips::getStatus, GroupsTrips.Status.down)
|
|
.ne(GroupsTrips::getStatus, GroupsTrips.Status.down)
|
|
|
.orderByAsc(GroupsTrips::getAvailableNum);
|
|
.orderByAsc(GroupsTrips::getAvailableNum);
|
|
|
- if (goodsDon.getId() == 26) {
|
|
|
|
|
- if (!List.of(209l, 210l).contains(sku.getId())) {
|
|
|
|
|
- queryWrapper.gt(GroupsTrips::getAvailableNum, 5);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
GroupsTrips groups = groupsMapper.selectOne(queryWrapper);
|
|
GroupsTrips groups = groupsMapper.selectOne(queryWrapper);
|
|
|
- if (goodsDon.getId() == 26 && groups == null) {
|
|
|
|
|
- queryWrapper.gt(GroupsTrips::getAvailableNum, 0);
|
|
|
|
|
- groups = groupsMapper.selectOne(queryWrapper);
|
|
|
|
|
- }
|
|
|
|
|
if (groups == null) {
|
|
if (groups == null) {
|
|
|
relation = createNewGroupsTrips(sku);
|
|
relation = createNewGroupsTrips(sku);
|
|
|
isNew = true;
|
|
isNew = true;
|
|
@@ -2228,7 +2217,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
.gt(OrderDon::getCreatedTime, DateUtil.offsetDay(DateTime.now(), -days))
|
|
.gt(OrderDon::getCreatedTime, DateUtil.offsetDay(DateTime.now(), -days))
|
|
|
.notIn(OrderDon::getStatus, Constant.noOrderAllStatus));
|
|
.notIn(OrderDon::getStatus, Constant.noOrderAllStatus));
|
|
|
if (count > time - 1)
|
|
if (count > time - 1)
|
|
|
- throw BusinessRuntimeException.getInstance(String.format("%s天内只能购买%s次ChatGPT Plus %s规格账号", days, time, specVal.replaceAll(";", "")));
|
|
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance(String.format("%s天内只能购买%s %s规格账号", days, time, specVal.replaceAll(";", "")));
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|