@ -1,6 +1,7 @@
@@ -1,6 +1,7 @@
package com.ruoyi.hl.controller ;
import cn.hutool.core.util.StrUtil ;
import com.alibaba.fastjson.JSONObject ;
import com.ruoyi.common.core.domain.AjaxResult ;
import com.ruoyi.framework.web.service.AliOSSService ;
import com.ruoyi.hl.config.WxConfig ;
@ -93,14 +94,24 @@ public class WxController {
@@ -93,14 +94,24 @@ public class WxController {
if ( allowList ! = null & & allowList . size ( ) > 0 ) {
BVideoAllow allow = allowList . get ( 0 ) ;
BVideos bVideos = new BVideos ( ) ;
bVideos . setParentId ( allow . getVideoId ( ) ) ;
List < BVideos > videosList = videosService . selectBVideosList ( bVideos ) ;
BVideos bVideos = videosService . selectBVideosById ( allow . getVideoId ( ) ) ;
BVideos bVideos2 = new BVideos ( ) ;
bVideos2 . setParentId ( allow . getVideoId ( ) ) ;
List < BVideos > videosList = videosService . selectBVideosList ( bVideos2 ) ;
videosList . forEach ( v - > {
BFile file = fileService . selectBFileById ( v . getFileId ( ) ) ;
v . setPath ( ossService . getDomain ( ) + "/" + file . getUuid ( ) ) ;
} ) ;
return AjaxResult . success ( videosList ) ;
JSONObject jsonObject = new JSONObject ( ) ;
jsonObject . put ( "name" , bVideos . getName ( ) ) ;
jsonObject . put ( "list" , videosList ) ;
return AjaxResult . success ( jsonObject ) ;
} else {
return AjaxResult . success ( new ArrayList < > ( ) ) ;
}