|
|
@@ -7,6 +7,7 @@ import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
+import com.fs.company.domain.CompanyUser;
|
|
|
import com.fs.framework.security.LoginUser;
|
|
|
import com.fs.framework.security.SecurityUtils;
|
|
|
import com.fs.framework.service.TokenService;
|
|
|
@@ -14,6 +15,7 @@ import com.fs.live.domain.LiveData;
|
|
|
import com.fs.live.param.LiveDataParam;
|
|
|
import com.fs.live.service.ILiveDataService;
|
|
|
import com.fs.live.vo.ColumnsConfigVo;
|
|
|
+import com.fs.live.vo.LiveUserDetailExportVO;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
@@ -38,6 +40,72 @@ public class LiveDataController extends BaseController
|
|
|
@Autowired
|
|
|
private TokenService tokenService;
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询直播间详情数据(SQL方式)
|
|
|
+ * @param liveId 直播间ID
|
|
|
+ * @return 详情数据
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('liveData:liveData:query')")
|
|
|
+ @GetMapping("/getLiveDataDetailBySql")
|
|
|
+ public R getLiveDataDetailBySql(@RequestParam Long liveId) {
|
|
|
+ return liveDataService.getLiveDataDetailBySql(liveId);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询直播间用户详情列表(SQL方式)
|
|
|
+ * @param liveId 直播间ID
|
|
|
+ * @return 用户详情列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('liveData:liveData:query')")
|
|
|
+ @GetMapping("/getLiveUserDetailListBySql")
|
|
|
+ public R getLiveUserDetailListBySql(@RequestParam Long liveId, HttpServletRequest request) {
|
|
|
+ CompanyUser user = tokenService.getLoginUser(request).getUser();
|
|
|
+
|
|
|
+ return liveDataService.getLiveUserDetailListBySql(liveId,user.getCompanyId(),user.getUserId());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询直播间详情数据(查询数据服务器处理方式)
|
|
|
+ * @param liveId 直播间ID
|
|
|
+ * @return 详情数据
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('liveData:liveData:query')")
|
|
|
+ @GetMapping("/getLiveDataDetailByServer")
|
|
|
+ public R getLiveDataDetailByServer(@RequestParam Long liveId) {
|
|
|
+ return liveDataService.getLiveDataDetailByServer(liveId);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询直播间用户详情列表(查询数据服务器处理方式)
|
|
|
+ * @param liveId 直播间ID
|
|
|
+ * @return 用户详情列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('liveData:liveData:query')")
|
|
|
+ @GetMapping("/getLiveUserDetailListByServer")
|
|
|
+ public R getLiveUserDetailListByServer(@RequestParam Long liveId) {
|
|
|
+ return liveDataService.getLiveUserDetailListByServer(liveId);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出直播间用户详情数据
|
|
|
+ * @param liveId 直播间ID
|
|
|
+ * @return Excel文件
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('liveData:liveData:export')")
|
|
|
+ @Log(title = "直播间用户详情", businessType = BusinessType.EXPORT)
|
|
|
+ @GetMapping("/exportLiveUserDetail")
|
|
|
+ public AjaxResult exportLiveUserDetail(@RequestParam Long liveId, HttpServletRequest request) {
|
|
|
+ CompanyUser user = tokenService.getLoginUser(request).getUser();
|
|
|
+ List<LiveUserDetailExportVO> list = liveDataService.exportLiveUserDetail(liveId,user.getCompanyId(),user.getUserId());
|
|
|
+ if (list == null || list.isEmpty()) {
|
|
|
+ return AjaxResult.error("未找到用户详情数据");
|
|
|
+ }
|
|
|
+
|
|
|
+ ExcelUtil<LiveUserDetailExportVO> util = new ExcelUtil<>(LiveUserDetailExportVO.class);
|
|
|
+ return util.exportExcel(list, "直播间用户详情数据");
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 直播数据页面卡片数据
|
|
|
*/
|