Эх сурвалжийг харах

演出查询修改接口 冲原来的当天改为全部

lutong 1 долоо хоног өмнө
parent
commit
ba21173e2b

+ 1 - 1
alien-store/src/main/java/shop/alien/store/controller/PerformanceListController.java

@@ -33,7 +33,7 @@ public class PerformanceListController {
      * 查询演出列表(用户端)
      * <p>
      * 根据店铺ID查询演出列表,支持分页
-     * 只返回审核通过、已上线、未删除的演出
+     * 只返回当前店铺下已上线、未删除的演出(无审核/过期等额外筛选)
      * 返回结果包含演出名称、演出者信息、日期范围、演出时间安排等
      * </p>
      *

+ 1 - 1
alien-store/src/main/java/shop/alien/store/service/PerformanceListService.java

@@ -18,7 +18,7 @@ public interface PerformanceListService {
      * 查询演出列表(用户端)
      * <p>
      * 根据店铺ID查询演出列表,支持分页
-     * 只返回审核通过、已上线、未删除的演出
+     * 只返回当前店铺下已上线、未删除的演出
      * </p>
      *
      * @param page    分页页数,必须大于0

+ 19 - 3
alien-store/src/main/java/shop/alien/store/service/impl/PerformanceListServiceImpl.java

@@ -90,8 +90,8 @@ public class PerformanceListServiceImpl implements PerformanceListService {
         // 构建分页对象
         IPage<BarPerformance> performancePage = new Page<>(page, size);
 
-        // 构建查询条件
-        LambdaQueryWrapper<BarPerformance> queryWrapper = buildQueryWrapper(storeId);
+        // 构建查询条件:仅店铺 + 已上线
+        LambdaQueryWrapper<BarPerformance> queryWrapper = buildOnlineListQueryWrapper(storeId);
 
         // 执行查询
         IPage<BarPerformance> result = barPerformanceMapper.selectPage(performancePage, queryWrapper);
@@ -132,7 +132,23 @@ public class PerformanceListServiceImpl implements PerformanceListService {
     }
 
     /**
-     * 构建查询条件
+     * 构建用户端列表查询条件(/performance/list/query)
+     * 仅查询指定店铺下已上线、未删除的演出,不做审核/过期等额外筛选
+     *
+     * @param storeId 店铺ID
+     * @return 查询条件包装器
+     */
+    private LambdaQueryWrapper<BarPerformance> buildOnlineListQueryWrapper(Integer storeId) {
+        LambdaQueryWrapper<BarPerformance> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper.eq(BarPerformance::getStoreId, storeId)
+                .eq(BarPerformance::getDeleteFlag, CommonConstant.DELETE_FLAG_UNDELETE)
+                .eq(BarPerformance::getOnlineStatus, CommonConstant.PERFORMANCE_ONLINE_STATUS_ONLINE)
+                .orderByDesc(BarPerformance::getCreatedTime);
+        return queryWrapper;
+    }
+
+    /**
+     * 构建查询条件(按日期分组等场景:含审核通过、未过期等筛选)
      *
      * @param storeId 店铺ID
      * @return 查询条件包装器