|
@@ -2260,26 +2260,33 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
Long now = System.currentTimeMillis();
|
|
Long now = System.currentTimeMillis();
|
|
|
List<ContentPlatformXcxPlan> list = new ArrayList<>();
|
|
List<ContentPlatformXcxPlan> list = new ArrayList<>();
|
|
|
for (XcxPlanSaveVideoParam videoParam : param.getVideoList()) {
|
|
for (XcxPlanSaveVideoParam videoParam : param.getVideoList()) {
|
|
|
- ContentPlatformXcxPlan xcxPlan = new ContentPlatformXcxPlan();
|
|
|
|
|
- xcxPlan.setAudiencePackage(param.getAudiencePackage());
|
|
|
|
|
- xcxPlan.setRemark(param.getRemark());
|
|
|
|
|
-
|
|
|
|
|
- Staff staff = new Staff();
|
|
|
|
|
- staff.setCarrierId("wxf7261ed54f2e450e");
|
|
|
|
|
- staff.setRemark(param.getRemark());
|
|
|
|
|
- String pageUrl = messageAttachmentService.getPageNoCache("pages/category", "touliu", "tencent", staff,
|
|
|
|
|
- videoParam.getVideoId(), "小程序", null, null, videoParam.getExperimentId());
|
|
|
|
|
- String rootSourceId = MessageUtil.getRootSourceId(pageUrl);
|
|
|
|
|
- xcxPlan.setPageUrl(pageUrl);
|
|
|
|
|
- xcxPlan.setRootSourceId(rootSourceId);
|
|
|
|
|
- xcxPlan.setStatus(PlanStatusEnum.NORMAL.getVal());
|
|
|
|
|
- xcxPlan.setCreateAccountId(loginUser.getId());
|
|
|
|
|
- xcxPlan.setCreateTimestamp(now);
|
|
|
|
|
- xcxPlan.setUpdateTimestamp(now);
|
|
|
|
|
- planMapperExt.insertXcxPlanReturnId(xcxPlan);
|
|
|
|
|
- list.add(xcxPlan);
|
|
|
|
|
- // 保存视频内容
|
|
|
|
|
- saveXcxPlanVideo(videoParam, xcxPlan.getId(), loginUser.getId());
|
|
|
|
|
|
|
+ int count = (videoParam.getCount() == null || videoParam.getCount() <= 0)
|
|
|
|
|
+ ? 1 : videoParam.getCount();
|
|
|
|
|
+ if (count > 200) {
|
|
|
|
|
+ throw new CommonException(ExceptionEnum.PARAM_ERROR);
|
|
|
|
|
+ }
|
|
|
|
|
+ for (int i = 0; i < count; i++) {
|
|
|
|
|
+ ContentPlatformXcxPlan xcxPlan = new ContentPlatformXcxPlan();
|
|
|
|
|
+ xcxPlan.setAudiencePackage(param.getAudiencePackage());
|
|
|
|
|
+ xcxPlan.setRemark(param.getRemark());
|
|
|
|
|
+
|
|
|
|
|
+ Staff staff = new Staff();
|
|
|
|
|
+ staff.setCarrierId("wxf7261ed54f2e450e");
|
|
|
|
|
+ staff.setRemark(param.getRemark());
|
|
|
|
|
+ String pageUrl = messageAttachmentService.getPageNoCache("pages/category", "touliu", "tencent", staff,
|
|
|
|
|
+ videoParam.getVideoId(), "小程序", null, null, videoParam.getExperimentId());
|
|
|
|
|
+ String rootSourceId = MessageUtil.getRootSourceId(pageUrl);
|
|
|
|
|
+ xcxPlan.setPageUrl(pageUrl);
|
|
|
|
|
+ xcxPlan.setRootSourceId(rootSourceId);
|
|
|
|
|
+ xcxPlan.setStatus(PlanStatusEnum.NORMAL.getVal());
|
|
|
|
|
+ xcxPlan.setCreateAccountId(loginUser.getId());
|
|
|
|
|
+ xcxPlan.setCreateTimestamp(now);
|
|
|
|
|
+ xcxPlan.setUpdateTimestamp(now);
|
|
|
|
|
+ planMapperExt.insertXcxPlanReturnId(xcxPlan);
|
|
|
|
|
+ list.add(xcxPlan);
|
|
|
|
|
+ // 保存视频内容
|
|
|
|
|
+ saveXcxPlanVideo(videoParam, xcxPlan.getId(), loginUser.getId());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return buildXcxPlanItemVOList(list);
|
|
return buildXcxPlanItemVOList(list);
|
|
|
}
|
|
}
|