|
|
@@ -1,43 +1,28 @@
|
|
|
package com.fs.admin.controller.audit;
|
|
|
|
|
|
-import java.util.*;
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
|
|
|
-import com.fs.admin.helper.AdminCrossTenantHelper;
|
|
|
+import com.fs.admin.service.IAdminLiveVideoService;
|
|
|
import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-/**
|
|
|
- * 总后台直播视频审计控制器
|
|
|
- * 遍历所有租户库查询 live_video_record 数据
|
|
|
- */
|
|
|
@RestController
|
|
|
@RequestMapping("/admin/liveVideo")
|
|
|
public class AdminLiveVideoController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
- private AdminCrossTenantHelper crossTenantHelper;
|
|
|
+ private IAdminLiveVideoService adminLiveVideoService;
|
|
|
|
|
|
- /**
|
|
|
- * 查询所有租户的直播视频列表
|
|
|
- */
|
|
|
@PreAuthorize("@ss.hasPermi('admin:liveVideo:list')")
|
|
|
@GetMapping("/list")
|
|
|
public TableDataInfo list(@RequestParam(required = false) Long companyId,
|
|
|
@RequestParam(required = false) String companyName,
|
|
|
@RequestParam(required = false) String videoTitle) {
|
|
|
- String sql = "SELECT id, title, live_id as liveId, play_url as playUrl, " +
|
|
|
- "duration, status, create_time as createTime " +
|
|
|
- "FROM live_video_record WHERE 1=1";
|
|
|
- StringBuilder sb = new StringBuilder(sql);
|
|
|
- if (videoTitle != null && !videoTitle.isEmpty()) {
|
|
|
- sb.append(" AND title LIKE '%").append(videoTitle.replace("'", "''")).append("%'");
|
|
|
- }
|
|
|
- sb.append(" ORDER BY create_time DESC");
|
|
|
-
|
|
|
- List<Map<String, Object>> allList = crossTenantHelper.queryAcrossTenants(companyId, companyName, sb.toString());
|
|
|
+ List<Map<String, Object>> allList = adminLiveVideoService.selectLiveVideoList(companyId, companyName, videoTitle);
|
|
|
return getDataTable(allList);
|
|
|
}
|
|
|
}
|