Forráskód Böngészése

商户PC端演出 增加 在线状态 演出类型 审核状态搜索

qinxuyang 2 hónapja
szülő
commit
e334248851

+ 18 - 7
alien-store/src/main/java/shop/alien/store/controller/BarPerformanceController.java

@@ -174,9 +174,12 @@ public class BarPerformanceController {
      * @param page    分页页数
      * @param size    分页条数
      * @param storeId 门店ID
-     * @param statusReview 审核状态(0-待审核 1-审核通过 2-审核拒绝)
+     * @param statusReview 审核状态(0-待审核 1-审核通过 2-审核拒绝)(已废弃,请使用reviewStatus)
      * @param category 演出分类(all-全部, not_started-未开始, in_progress-进行中, ended-已结束)
      * @param performanceName 演出名称(可选,支持模糊搜索)
+     * @param performanceType 演出类型(0-特邀演出,1-常规演出)
+     * @param onlineStatus 上线状态(0-下线,1-上线)
+     * @param reviewStatus 审核状态(0-待审核 1-审核通过 2-审核拒绝)
      * @return 演出列表
      */
     @ApiOperation("根据门店ID查询演出列表(支持按审核状态、分类和名称搜索)")
@@ -184,9 +187,12 @@ public class BarPerformanceController {
             @ApiImplicitParam(name = "page", value = "分页页数", dataType = "Integer", paramType = "query", required = true),
             @ApiImplicitParam(name = "size", value = "分页条数", dataType = "Integer", paramType = "query", required = true),
             @ApiImplicitParam(name = "storeId", value = "门店ID", dataType = "Integer", paramType = "query", required = true),
-            @ApiImplicitParam(name = "statusReview", value = "审核状态(0-待审核 1-审核通过 2-审核拒绝)", dataType = "Integer", paramType = "query", required = false),
+            @ApiImplicitParam(name = "statusReview", value = "审核状态(0-待审核 1-审核通过 2-审核拒绝)(已废弃,请使用reviewStatus)", dataType = "Integer", paramType = "query", required = false),
             @ApiImplicitParam(name = "category", value = "演出分类(all-全部, not_started-未开始, in_progress-进行中, ended-已结束)", dataType = "String", paramType = "query", required = false),
-            @ApiImplicitParam(name = "performanceName", value = "演出名称(支持模糊搜索)", dataType = "String", paramType = "query", required = false)
+            @ApiImplicitParam(name = "performanceName", value = "演出名称(支持模糊搜索)", dataType = "String", paramType = "query", required = false),
+            @ApiImplicitParam(name = "performanceType", value = "演出类型(0-特邀演出,1-常规演出)", dataType = "Integer", paramType = "query", required = false),
+            @ApiImplicitParam(name = "onlineStatus", value = "上线状态(0-下线,1-上线)", dataType = "Integer", paramType = "query", required = false),
+            @ApiImplicitParam(name = "reviewStatus", value = "审核状态(0-待审核 1-审核通过 2-审核拒绝)", dataType = "Integer", paramType = "query", required = false)
     })
     @GetMapping("/listByStoreId")
     public R<IPage<BarPerformance>> queryPerformanceListByStoreId(
@@ -195,12 +201,17 @@ public class BarPerformanceController {
             @RequestParam Integer storeId,
             @RequestParam(required = false) Integer statusReview,
             @RequestParam(required = false) String category,
-            @RequestParam(required = false) String performanceName) {
-        log.info("BarPerformanceController.queryPerformanceListByStoreId?page={}, size={}, storeId={}, statusReview={}, category={}, performanceName={}",
-                page, size, storeId, statusReview, category, performanceName);
+            @RequestParam(required = false) String performanceName,
+            @RequestParam(required = false) Integer performanceType,
+            @RequestParam(required = false) Integer onlineStatus,
+            @RequestParam(required = false) Integer reviewStatus) {
+        // 兼容旧参数:如果reviewStatus为空但statusReview不为空,使用statusReview
+        Integer finalReviewStatus = reviewStatus != null ? reviewStatus : statusReview;
+        log.info("BarPerformanceController.queryPerformanceListByStoreId?page={}, size={}, storeId={}, statusReview={}, category={}, performanceName={}, performanceType={}, onlineStatus={}, reviewStatus={}",
+                page, size, storeId, statusReview, category, performanceName, performanceType, onlineStatus, reviewStatus);
         try {
             IPage<BarPerformance> performanceList = barPerformanceService.queryPerformanceListByStoreIdAndCategory(
-                    page, size, storeId, statusReview, category != null ? category : "all", performanceName);
+                    page, size, storeId, finalReviewStatus, category != null ? category : "all", performanceName, performanceType, onlineStatus);
             return R.data(performanceList);
         } catch (Exception e) {
             log.error("根据门店ID查询演出列表失败", e);

+ 4 - 2
alien-store/src/main/java/shop/alien/store/service/BarPerformanceService.java

@@ -74,10 +74,12 @@ public interface BarPerformanceService {
      * @param page    分页页数
      * @param size    分页条数
      * @param storeId 门店ID
-     * @param statusReview 审核状态(0-待审核 1-审核通过 2-审核拒绝)
+     * @param reviewStatus 审核状态(0-待审核 1-审核通过 2-审核拒绝)
      * @param category 演出分类(all-全部, not_started-未开始, in_progress-进行中, ended-已结束)
      * @param performanceName 演出名称(可选,支持模糊搜索)
+     * @param performanceType 演出类型(0-特邀演出,1-常规演出)
+     * @param onlineStatus 上线状态(0-下线,1-上线)
      * @return 演出列表
      */
-    IPage<BarPerformance> queryPerformanceListByStoreIdAndCategory(Integer page, Integer size, Integer storeId, Integer statusReview, String category, String performanceName);
+    IPage<BarPerformance> queryPerformanceListByStoreIdAndCategory(Integer page, Integer size, Integer storeId, Integer reviewStatus, String category, String performanceName, Integer performanceType, Integer onlineStatus);
 }

+ 12 - 2
alien-store/src/main/java/shop/alien/store/service/impl/BarPerformanceServiceImpl.java

@@ -572,11 +572,11 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
                 // 忽略无效的状态值
             }
         }
-        return queryPerformanceListByStoreIdAndCategory(page, size, storeId, reviewStatus, "all", null);
+        return queryPerformanceListByStoreIdAndCategory(page, size, storeId, reviewStatus, "all", null, null, null);
     }
 
     @Override
-    public IPage<BarPerformance> queryPerformanceListByStoreIdAndCategory(Integer page, Integer size, Integer storeId, Integer reviewStatus, String category, String performanceName) {
+    public IPage<BarPerformance> queryPerformanceListByStoreIdAndCategory(Integer page, Integer size, Integer storeId, Integer reviewStatus, String category, String performanceName, Integer performanceType, Integer onlineStatus) {
         if (page == null || size == null || storeId == null || storeId <= 0) {
             return new Page<>();
         }
@@ -590,6 +590,16 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
             queryWrapper.like("performance_name", performanceName);
         }
 
+        // 按演出类型筛选
+        if (performanceType != null) {
+            queryWrapper.eq("performance_type", performanceType);
+        }
+
+        // 按上线状态筛选
+        if (onlineStatus != null) {
+            queryWrapper.eq("online_status", onlineStatus);
+        }
+
         // 按审核状态筛选(数据库字段 review_status)
         if (reviewStatus != null) {
             queryWrapper.eq("review_status", reviewStatus);