Sfoglia il codice sorgente

fix 去掉midJourney上车条件

zoujiajian 3 anni fa
parent
commit
b009985f01

+ 3 - 14
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java

@@ -254,10 +254,8 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 					}
 
 				} else {
-					if (goodsDon.getId() != 26) {
-						//寻找差不多过期时间规格的车位
-						relation = groupRelationFrontService.getSimilarExpiredGroupRelation(sku.getId(), sku.getMonths(), null);
-					}
+					//寻找差不多过期时间规格的车位
+					relation = groupRelationFrontService.getSimilarExpiredGroupRelation(sku.getId(), sku.getMonths(), null);
 					if (relation == null) {
 						//TODO 如果没指定座位,等待逻辑确认
 						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")
 								.ne(GroupsTrips::getStatus, GroupsTrips.Status.down)
 								.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);
-						if (goodsDon.getId() == 26 && groups == null) {
-							queryWrapper.gt(GroupsTrips::getAvailableNum, 0);
-							groups = groupsMapper.selectOne(queryWrapper);
-						}
 						if (groups == null) {
 							relation = createNewGroupsTrips(sku);
 							isNew = true;
@@ -2228,7 +2217,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 										.gt(OrderDon::getCreatedTime, DateUtil.offsetDay(DateTime.now(), -days))
 										.notIn(OrderDon::getStatus, Constant.noOrderAllStatus));
 								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;
 							}
 						}