|
|
@@ -2,10 +2,7 @@ package com.tzld.piaoquan.api.controller.contentplatform;
|
|
|
|
|
|
import com.tzld.piaoquan.api.annotation.JwtIgnore;
|
|
|
import com.tzld.piaoquan.api.annotation.RateLimit;
|
|
|
-import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
|
|
|
-import com.tzld.piaoquan.api.common.exception.CommonException;
|
|
|
-import com.tzld.piaoquan.api.job.contentplatform.ContentPlatformVideoJob;
|
|
|
-import com.tzld.piaoquan.api.job.contentplatform.ContentPlatformDemandVideoJob;
|
|
|
+import com.tzld.piaoquan.api.annotation.RequireSign;
|
|
|
import com.tzld.piaoquan.api.model.param.IdParam;
|
|
|
import com.tzld.piaoquan.api.model.param.contentplatform.*;
|
|
|
import com.tzld.piaoquan.api.model.vo.contentplatform.GzhPlanItemVO;
|
|
|
@@ -29,20 +26,16 @@ public class ContentPlatformPlanController {
|
|
|
@Autowired
|
|
|
ContentPlatformPlanService planService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private ContentPlatformVideoJob videoJob;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ContentPlatformDemandVideoJob demandVideoJob;
|
|
|
-
|
|
|
@ApiOperation(value = "公众号计划列表")
|
|
|
@PostMapping("/gzh/list")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<Page<GzhPlanItemVO>> gzhPlanList(@RequestBody GzhPlanListParam param) {
|
|
|
return CommonResponse.success(planService.gzhPlanList(param));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "公众号计划 创建/更新")
|
|
|
@PostMapping("/gzh/save")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<Void> gzhPlanSave(@RequestBody GzhPlanSaveParam param) {
|
|
|
planService.gzhPlanSave(param);
|
|
|
return CommonResponse.success();
|
|
|
@@ -50,6 +43,7 @@ public class ContentPlatformPlanController {
|
|
|
|
|
|
@ApiOperation(value = "公众号计划 删除")
|
|
|
@PostMapping("/gzh/delete")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<Void> gzhPlanDelete(@RequestBody IdParam<Long> param) {
|
|
|
planService.gzhPlanDelete(param.getId());
|
|
|
return CommonResponse.success();
|
|
|
@@ -57,6 +51,7 @@ public class ContentPlatformPlanController {
|
|
|
|
|
|
@ApiOperation(value = "公众号计划 平台发布开关修改")
|
|
|
@PostMapping("/gzh/updateStagePublishStatus")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<Void> gzhUpdateStagePublishStatus(@RequestBody GzhPlanStagePublishStatusUpdateParam param) {
|
|
|
planService.gzhUpdateStagePublishStatus(param.getId(), param.getStagePublishStatus());
|
|
|
return CommonResponse.success();
|
|
|
@@ -65,6 +60,7 @@ public class ContentPlatformPlanController {
|
|
|
@ApiOperation(value = "发布内容视频列表")
|
|
|
@PostMapping("/videoContentList")
|
|
|
@RateLimit(timeWindow = 30, maxRequests = 10, limitByAccount = true, message = "请求过于频繁,请稍后再试")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<Page<VideoContentItemVO>> getVideoContentList(@RequestBody VideoContentListParam param) {
|
|
|
return CommonResponse.success(planService.getVideoContentList(param));
|
|
|
}
|
|
|
@@ -72,6 +68,7 @@ public class ContentPlatformPlanController {
|
|
|
@ApiOperation(value = "向量匹配视频列表")
|
|
|
@PostMapping("/vector/videoContentList")
|
|
|
@RateLimit(timeWindow = 30, maxRequests = 10, limitByAccount = true, message = "请求过于频繁,请稍后再试")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<Page<VideoContentItemVO>> getVectorVideoContentList(@RequestBody VideoContentListParam param) {
|
|
|
return CommonResponse.success(planService.getVectorVideoContentList(param));
|
|
|
}
|
|
|
@@ -79,6 +76,7 @@ public class ContentPlatformPlanController {
|
|
|
@ApiOperation(value = "个人上传发布内容视频列表")
|
|
|
@PostMapping("/upload/videoContentList")
|
|
|
@RateLimit(timeWindow = 30, maxRequests = 10, limitByAccount = true, message = "请求过于频繁,请稍后再试")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<Page<VideoContentItemVO>> getUploadVideoContentList(@RequestBody VideoContentListParam param) {
|
|
|
return CommonResponse.success(planService.getUploadVideoContentList(param));
|
|
|
}
|
|
|
@@ -86,6 +84,7 @@ public class ContentPlatformPlanController {
|
|
|
@ApiOperation(value = "需求匹配视频列表")
|
|
|
@PostMapping("/demand/videoContentList")
|
|
|
@RateLimit(timeWindow = 30, maxRequests = 10, limitByAccount = true, message = "请求过于频繁,请稍后再试")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<Page<VideoContentItemVO>> getDemandVideoContentList(@RequestBody VideoContentListParam param) {
|
|
|
return CommonResponse.success(planService.getDemandVideoContentList(param));
|
|
|
}
|
|
|
@@ -98,30 +97,35 @@ public class ContentPlatformPlanController {
|
|
|
|
|
|
@ApiOperation(value = "发布内容视频封面截帧列表")
|
|
|
@PostMapping("/videoContentCoverFrameList")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<List<String>> getVideoContentCoverFrameList(@RequestBody VideoContentCoverFrameParam param) {
|
|
|
return CommonResponse.success(planService.getVideoContentCoverFrameList(param));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "企微计划列表")
|
|
|
@PostMapping("/qw/list")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<Page<QwPlanItemVO>> qwPlanList(@RequestBody QwPlanListParam param) {
|
|
|
return CommonResponse.success(planService.qwPlanList(param));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "企微计划列表导出")
|
|
|
@PostMapping("/qw/export")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<String> qwPlanExport(@RequestBody QwPlanListParam param) {
|
|
|
return CommonResponse.success(planService.qwPlanExport(param));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "企微计划 创建/更新")
|
|
|
@PostMapping("/qw/save")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<List<QwPlanItemVO>> qwPlanSave(@RequestBody QwPlanSaveParam param) {
|
|
|
return CommonResponse.success(planService.qwPlanSave(param));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "企微计划 删除")
|
|
|
@PostMapping("/qw/delete")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<Void> qwPlanDelete(@RequestBody IdParam<Long> param) {
|
|
|
planService.qwPlanDelete(param.getId());
|
|
|
return CommonResponse.success();
|
|
|
@@ -135,24 +139,28 @@ public class ContentPlatformPlanController {
|
|
|
|
|
|
@ApiOperation(value = "小程序计划列表")
|
|
|
@PostMapping("/xcx/list")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<Page<XcxPlanItemVO>> xcxPlanList(@RequestBody XcxPlanListParam param) {
|
|
|
return CommonResponse.success(planService.xcxPlanList(param));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "小程序计划列表导出")
|
|
|
@PostMapping("/xcx/export")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<String> xcxPlanExport(@RequestBody XcxPlanListParam param) {
|
|
|
return CommonResponse.success(planService.xcxPlanExport(param));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "小程序计划 创建/更新")
|
|
|
@PostMapping("/xcx/save")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<List<XcxPlanItemVO>> xcxPlanSave(@RequestBody XcxPlanSaveParam param) {
|
|
|
return CommonResponse.success(planService.xcxPlanSave(param));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "小程序计划 删除")
|
|
|
@PostMapping("/xcx/delete")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<Void> xcxPlanDelete(@RequestBody IdParam<Long> param) {
|
|
|
planService.xcxPlanDelete(param.getId());
|
|
|
return CommonResponse.success();
|
|
|
@@ -160,6 +168,7 @@ public class ContentPlatformPlanController {
|
|
|
|
|
|
@ApiOperation(value = "小程序计划 多链接生成(同 video 复制 N 份)")
|
|
|
@PostMapping("/xcx/multiLink")
|
|
|
+ @RequireSign
|
|
|
public CommonResponse<List<XcxPlanItemVO>> xcxPlanMultiLink(@RequestBody XcxPlanMultiLinkParam param) {
|
|
|
return CommonResponse.success(planService.xcxPlanMultiLink(param));
|
|
|
}
|
|
|
@@ -188,59 +197,4 @@ public class ContentPlatformPlanController {
|
|
|
public CommonResponse<String> getShareUrlLink(@RequestParam String pageUrl) {
|
|
|
return CommonResponse.success(planService.getShareUrlLink(pageUrl));
|
|
|
}
|
|
|
-
|
|
|
- @ApiOperation(value = "同步最近top1000视频", hidden = true)
|
|
|
- @JwtIgnore
|
|
|
- @GetMapping("/job/syncContentPlatformVideoJob")
|
|
|
- public CommonResponse<Void> syncContentPlatformVideoJob(String dateStr) {
|
|
|
- videoJob.syncContentPlatformVideoJob(dateStr);
|
|
|
- return CommonResponse.success();
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation(value = "检查视频状态", hidden = true)
|
|
|
- @JwtIgnore
|
|
|
- @GetMapping("/job/checkContentPlatformVideoStatusJob")
|
|
|
- public CommonResponse<Void> checkContentPlatformVideoStatusJob(String dateStr) {
|
|
|
- videoJob.checkContentPlatformVideoStatusJob(dateStr);
|
|
|
- return CommonResponse.success();
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation(value = "同步最近top1000视频统计数据", hidden = true)
|
|
|
- @JwtIgnore
|
|
|
- @GetMapping("/job/syncContentPlatformVideoDatastatJob")
|
|
|
- public CommonResponse<Void> syncContentPlatformVideoDatastatJob(String dateStr) {
|
|
|
- videoJob.syncContentPlatformVideoDatastatJob(dateStr);
|
|
|
- return CommonResponse.success();
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation(value = "同步最近top1000视频统计数据-推荐指数", hidden = true)
|
|
|
- @JwtIgnore
|
|
|
- @GetMapping("/job/calContentPlatformVideoDatastatAggRecommendRateJob")
|
|
|
- public CommonResponse<Void> calContentPlatformVideoDatastatAggRecommendRateJob(String dateStr) {
|
|
|
- videoJob.calContentPlatformVideoDatastatAggRecommendRateJob(dateStr);
|
|
|
- return CommonResponse.success();
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation(value = "公众号推送-检查rootSourceId是否存在", hidden = true)
|
|
|
- @JwtIgnore
|
|
|
- @GetMapping("/gzhPush/checkExistRootSourceId")
|
|
|
- public CommonResponse<Boolean> gzhPushCheckExistRootSourceId(String rootSourceId) {
|
|
|
- return CommonResponse.success(planService.gzhPushCheckExistRootSourceId(rootSourceId));
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation(value = "同步需求匹配视频数据", hidden = true)
|
|
|
- @JwtIgnore
|
|
|
- @GetMapping("/job/syncContentPlatformDemandVideoJob")
|
|
|
- public CommonResponse<Void> syncContentPlatformDemandVideoJob(String dateStr) {
|
|
|
- demandVideoJob.syncContentPlatformDemandVideoJob(dateStr);
|
|
|
- return CommonResponse.success();
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation(value = "检查需求匹配视频状态", hidden = true)
|
|
|
- @JwtIgnore
|
|
|
- @GetMapping("/job/checkContentPlatformDemandVideoStatusJob")
|
|
|
- public CommonResponse<Void> checkContentPlatformDemandVideoStatusJob() {
|
|
|
- demandVideoJob.checkContentPlatformDemandVideoStatusJob(null);
|
|
|
- return CommonResponse.success();
|
|
|
- }
|
|
|
}
|