|
@@ -23,7 +23,6 @@ import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformAccountServi
|
|
|
import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformApiService;
|
|
|
import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformCooperateAccountService;
|
|
|
import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformPlanService;
|
|
|
-import com.tzld.piaoquan.growth.common.common.base.CommonResponse;
|
|
|
import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData;
|
|
|
import com.tzld.piaoquan.growth.common.utils.RedisUtils;
|
|
|
import com.tzld.piaoquan.growth.common.utils.page.Page;
|
|
@@ -120,12 +119,12 @@ public class ContentPlatformApiServiceImpl implements ContentPlatformApiService
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<CommonResponse<List<VideoPageUrlVO>>> getVideoPageUrl(String token, GetVideoPageUrlParam param) {
|
|
|
+ public List<VideoPageUrlVO> getVideoPageUrl(String token, GetVideoPageUrlParam param) {
|
|
|
ContentPlatformAccount account = checkToken(token);
|
|
|
if (CollectionUtils.isEmpty(param.getPlanList()) || param.getPlanList().size() > 3) {
|
|
|
throw new CommonException(ExceptionEnum.API_PAGE_URL_SIZE_TOO_LARGE);
|
|
|
}
|
|
|
- List<CommonResponse<List<VideoPageUrlVO>>> result = new ArrayList<>();
|
|
|
+ List<VideoPageUrlVO> result = new ArrayList<>();
|
|
|
List<Long> videoIds = param.getPlanList().stream().flatMap(o -> o.getVideoIds().stream()).collect(Collectors.toList());
|
|
|
List<ContentPlatformVideo> videoList = planMapperExt.getVideoListByIds(videoIds);
|
|
|
Map<Long, ContentPlatformVideo> videoMap = videoList.stream().collect(Collectors.toMap(ContentPlatformVideo::getVideoId, video -> video));
|
|
@@ -137,7 +136,7 @@ public class ContentPlatformApiServiceImpl implements ContentPlatformApiService
|
|
|
for (GetVideoPageUrlParam.PlanItem item : param.getPlanList()) {
|
|
|
int code = 0;
|
|
|
String msg = "";
|
|
|
- List<VideoPageUrlVO> data = new ArrayList<>();
|
|
|
+ List<VideoPageUrlVO.VideoPageUrlItem> data = new ArrayList<>();
|
|
|
try {
|
|
|
GzhPlanSaveParam saveParam = new GzhPlanSaveParam();
|
|
|
saveParam.setPublishStage(PublishStageEnum.USER.getVal());
|
|
@@ -164,7 +163,7 @@ public class ContentPlatformApiServiceImpl implements ContentPlatformApiService
|
|
|
List<CgiReplyBucketData> replyBucketDataList = cgiReplyService.getCgiReplyBucketDataListByGhIdVideoId(
|
|
|
gzhAccount.getGhId(), item.getVideoIds(), "manual");
|
|
|
for (CgiReplyBucketData cgiReplyBucketData : replyBucketDataList) {
|
|
|
- VideoPageUrlVO vo = new VideoPageUrlVO();
|
|
|
+ VideoPageUrlVO.VideoPageUrlItem vo = new VideoPageUrlVO.VideoPageUrlItem();
|
|
|
vo.setVideoId(cgiReplyBucketData.getMiniVideoId());
|
|
|
vo.setTitle(cgiReplyBucketData.getTitle());
|
|
|
vo.setCover(cgiReplyBucketData.getCoverUrl());
|
|
@@ -175,7 +174,8 @@ public class ContentPlatformApiServiceImpl implements ContentPlatformApiService
|
|
|
code = -1;
|
|
|
msg = e.getMessage();
|
|
|
} finally {
|
|
|
- CommonResponse<List<VideoPageUrlVO>> response = new CommonResponse<>();
|
|
|
+ VideoPageUrlVO response = new VideoPageUrlVO();
|
|
|
+ response.setId(item.getId());
|
|
|
response.setCode(code);
|
|
|
response.setMsg(msg);
|
|
|
response.setData(data);
|