|
|
@@ -0,0 +1,105 @@
|
|
|
+package com.fs.live.controller;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+import com.fs.live.vo.LiveWatchLogListVO;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+import com.fs.common.annotation.Log;
|
|
|
+import com.fs.common.core.controller.BaseController;
|
|
|
+import com.fs.common.core.domain.AjaxResult;
|
|
|
+import com.fs.common.enums.BusinessType;
|
|
|
+import com.fs.live.domain.LiveWatchLog;
|
|
|
+import com.fs.live.service.ILiveWatchLogService;
|
|
|
+import com.fs.common.utils.poi.ExcelUtil;
|
|
|
+import com.fs.common.core.page.TableDataInfo;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 直播看课记录Controller(管理端,展示全部)
|
|
|
+ *
|
|
|
+ * @author fs
|
|
|
+ * @date 2026-07-20
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/live/liveWatchLog")
|
|
|
+public class LiveWatchLogController extends BaseController
|
|
|
+{
|
|
|
+ @Autowired
|
|
|
+ private ILiveWatchLogService liveWatchLogService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询直播看课记录列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:liveWatchLog:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(LiveWatchLog liveWatchLog)
|
|
|
+ {
|
|
|
+ startPage();
|
|
|
+ List<LiveWatchLogListVO> list = liveWatchLogService.selectLiveWatchLogListInfo(liveWatchLog);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出直播看课记录列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:liveWatchLog:export')")
|
|
|
+ @Log(title = "直播看课记录", businessType = BusinessType.EXPORT)
|
|
|
+ @GetMapping("/export")
|
|
|
+ public AjaxResult export(LiveWatchLog liveWatchLog)
|
|
|
+ {
|
|
|
+ List<LiveWatchLogListVO> list = liveWatchLogService.selectLiveWatchLogListInfo(liveWatchLog);
|
|
|
+ ExcelUtil<LiveWatchLogListVO> util = new ExcelUtil<LiveWatchLogListVO>(LiveWatchLogListVO.class);
|
|
|
+ return util.exportExcel(list, "直播看课记录数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取直播看课记录详细信息
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:liveWatchLog:query')")
|
|
|
+ @GetMapping(value = "/{logId}")
|
|
|
+ public AjaxResult getInfo(@PathVariable("logId") Long logId)
|
|
|
+ {
|
|
|
+ return AjaxResult.success(liveWatchLogService.selectLiveWatchLogByLogId(logId));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增直播看课记录
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:liveWatchLog:add')")
|
|
|
+ @Log(title = "直播看课记录", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping
|
|
|
+ public AjaxResult add(@RequestBody LiveWatchLog liveWatchLog)
|
|
|
+ {
|
|
|
+ return toAjax(liveWatchLogService.insertLiveWatchLog(liveWatchLog));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改直播看课记录
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:liveWatchLog:edit')")
|
|
|
+ @Log(title = "直播看课记录", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping
|
|
|
+ public AjaxResult edit(@RequestBody LiveWatchLog liveWatchLog)
|
|
|
+ {
|
|
|
+ return toAjax(liveWatchLogService.updateLiveWatchLog(liveWatchLog));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除直播看课记录
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('live:liveWatchLog:remove')")
|
|
|
+ @Log(title = "直播看课记录", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{logIds}")
|
|
|
+ public AjaxResult remove(@PathVariable Long[] logIds)
|
|
|
+ {
|
|
|
+ return toAjax(liveWatchLogService.deleteLiveWatchLogByLogIds(logIds));
|
|
|
+ }
|
|
|
+}
|