zoujiajian hai 1 ano
pai
achega
a258f03877

+ 1 - 1
netflix-dao/src/main/java/com/cyksj/mapper/GroupsMapper.java

@@ -40,7 +40,7 @@ public interface GroupsMapper extends BaseMapper<GroupsTrips> {
 
 	Integer countExpiredNum(Long accountId);
 
-	GroupsTrips selectTicketGroups(@Param("skuId") Long skuId, @Param("status") GroupsTrips.Status status, @Param("maxNum") Integer maxNum, @Param("ip") String ip);
+	GroupsTrips selectTicketGroups(@Param("skuId") Long skuId, @Param("status") GroupsTrips.Status status, @Param("maxNum") Integer maxNum, @Param("ip") String ip, @Param("filterAccountTime") DateTime filterAccountTime);
 
 	GroupsTrips selectCollegeStudentUserGptTicket(Long skuId);
 

+ 3 - 0
netflix-dao/src/main/resources/mapper/GroupsMapper.xml

@@ -95,6 +95,9 @@
         from groups_relation gr
         where gr.groups_id = gt.id
         and gr.user_id != 0 and gr.num &lt;= #{maxNum}))
+        <if test="filterAccountTime!=null">
+            and gt.created_time > #{filterAccountTime}
+        </if>
         order by available_num asc
         limit 1
     </select>

+ 7 - 2
netflix-service/src/main/java/com/cyksj/service/relation/impl/GroupRelationFrontServiceImpl.java

@@ -587,11 +587,16 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
 				relation = getSimilarExpiredGroupRelation(sku, null, ip);
 				if (relation == null) {
 					//TODO 如果没指定座位,等待逻辑确认
-					groups = groupsMapper.selectTicketGroups(sku.getId(), GroupsTrips.Status.validity, maxNum, ip);
+					DateTime filterAccountTime = null;
+					//奈飞过滤6月23号之前的车队
+					if (sku.getGoodsId() == Constant.NETFLIX_GID) {
+						filterAccountTime = DateUtil.parse("2025-06-23");
+					}
+					groups = groupsMapper.selectTicketGroups(sku.getId(), GroupsTrips.Status.validity, maxNum, ip, filterAccountTime);
 
 					if (groups == null) {
 						//待发车
-						groups = groupsMapper.selectTicketGroups(sku.getId(), GroupsTrips.Status.waiting, maxNum, ip);
+						groups = groupsMapper.selectTicketGroups(sku.getId(), GroupsTrips.Status.waiting, maxNum, ip, null);
 					}
 					//新增空车队
 					if (groups == null) {