| 
														
															@@ -6,6 +6,7 @@ import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.tzld.piaoquan.longarticle.common.enums.ContentStatusEnum; 
														 | 
														
														 | 
														
															 import com.tzld.piaoquan.longarticle.common.enums.ContentStatusEnum; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.tzld.piaoquan.longarticle.common.enums.PublicFlagEnum; 
														 | 
														
														 | 
														
															 import com.tzld.piaoquan.longarticle.common.enums.PublicFlagEnum; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.tzld.piaoquan.longarticle.common.enums.PublishGzhPushTypeEnum; 
														 | 
														
														 | 
														
															 import com.tzld.piaoquan.longarticle.common.enums.PublishGzhPushTypeEnum; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.tzld.piaoquan.longarticle.common.enums.TransformationEnum; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.*; 
														 | 
														
														 | 
														
															 import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.*; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.tzld.piaoquan.longarticle.model.bo.VideoDetail; 
														 | 
														
														 | 
														
															 import com.tzld.piaoquan.longarticle.model.bo.VideoDetail; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.tzld.piaoquan.longarticle.model.dto.ArticleSortRequest; 
														 | 
														
														 | 
														
															 import com.tzld.piaoquan.longarticle.model.dto.ArticleSortRequest; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -260,20 +261,23 @@ public class ContentServiceImpl implements ContentService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         SingleVideoSource singleVideoSource = singleVideoSources.get(0); 
														 | 
														
														 | 
														
															         SingleVideoSource singleVideoSource = singleVideoSources.get(0); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         String ossPath = singleVideoSource.getVideoOssPath(); 
														 | 
														
														 | 
														
															         String ossPath = singleVideoSource.getVideoOssPath(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         String title = singleVideoSource.getMiniProgramTitle(); 
														 | 
														
														 | 
														
															         String title = singleVideoSource.getMiniProgramTitle(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        int transformationType = 0; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        //是否存在片尾引导 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        int transformationType; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         int publishType = 0; 
														 | 
														
														 | 
														
															         int publishType = 0; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         String videoOriginType = "video_pool"; 
														 | 
														
														 | 
														
															         String videoOriginType = "video_pool"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         Long videoOriginId = (long) singleVideoSource.getId(); 
														 | 
														
														 | 
														
															         Long videoOriginId = (long) singleVideoSource.getId(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         VideoEndScreen videoEndScreen = existVideoEndScreen(videoOriginId, videoOriginType); 
														 | 
														
														 | 
														
															         VideoEndScreen videoEndScreen = existVideoEndScreen(videoOriginId, videoOriginType); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         //查询到改写的视频  随机选择原视频或者改写后的视频 
														 | 
														
														 | 
														
															         //查询到改写的视频  随机选择原视频或者改写后的视频 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         if (videoEndScreen != null) { 
														 | 
														
														 | 
														
															         if (videoEndScreen != null) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            transformationType = 1; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            int random = ToolUtil.getRandom(2); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            if (random == 1) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            transformationType = TransformationEnum.EXIST.getType(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            //存在片尾引导后  50%概率走有片尾引导的视频 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            publishType = ToolUtil.getRandom(2); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (publishType == 1) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 ossPath = videoEndScreen.getNewOssPath(); 
														 | 
														
														 | 
														
															                 ossPath = videoEndScreen.getNewOssPath(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 title = videoEndScreen.getTitle(); 
														 | 
														
														 | 
														
															                 title = videoEndScreen.getTitle(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                publishType = 1; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            transformationType = TransformationEnum.NOT_EXIST.getType(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         } 
														 | 
														
														 | 
														
															         } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         VideoDetail videoDetail = videoService.publish(ossPath, 
														 | 
														
														 | 
														
															         VideoDetail videoDetail = videoService.publish(ossPath, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 SINGLE_VIDEO_UID, title); 
														 | 
														
														 | 
														
															                 SINGLE_VIDEO_UID, title); 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -306,20 +310,21 @@ public class ContentServiceImpl implements ContentService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 continue; 
														 | 
														
														 | 
														
															                 continue; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             String title = kimiText.getKimiTitle(); 
														 | 
														
														 | 
														
															             String title = kimiText.getKimiTitle(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            int transformationType = 0; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            int transformationType; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             int publishType = 0; 
														 | 
														
														 | 
														
															             int publishType = 0; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             String videoOriginType = "long_article"; 
														 | 
														
														 | 
														
															             String videoOriginType = "long_article"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             Long videoOriginId = (long) crawlerVideoId; 
														 | 
														
														 | 
														
															             Long videoOriginId = (long) crawlerVideoId; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             VideoEndScreen videoEndScreen = existVideoEndScreen(videoOriginId, videoOriginType); 
														 | 
														
														 | 
														
															             VideoEndScreen videoEndScreen = existVideoEndScreen(videoOriginId, videoOriginType); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             //查询到改写的视频  随机选择原视频或者改写后的视频 
														 | 
														
														 | 
														
															             //查询到改写的视频  随机选择原视频或者改写后的视频 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (videoEndScreen != null) { 
														 | 
														
														 | 
														
															             if (videoEndScreen != null) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                transformationType = 1; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                int random = ToolUtil.getRandom(2); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                if (random == 1) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                transformationType = TransformationEnum.EXIST.getType(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                publishType = ToolUtil.getRandom(2); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                if (publishType == 1) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     videoOssPath = videoEndScreen.getNewOssPath(); 
														 | 
														
														 | 
														
															                     videoOssPath = videoEndScreen.getNewOssPath(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                     title = videoEndScreen.getTitle(); 
														 | 
														
														 | 
														
															                     title = videoEndScreen.getTitle(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    publishType = 1; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                transformationType = TransformationEnum.NOT_EXIST.getType(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             VideoDetail videoDetail = videoService.publish(videoOssPath, userId, title); 
														 | 
														
														 | 
														
															             VideoDetail videoDetail = videoService.publish(videoOssPath, userId, title); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (videoDetail == null) { 
														 | 
														
														 | 
														
															             if (videoDetail == null) { 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -389,7 +394,7 @@ public class ContentServiceImpl implements ContentService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public void logEvent(String videoOriginType, Long videoOriginId, String videoId, 
														 | 
														
														 | 
														
															     public void logEvent(String videoOriginType, Long videoOriginId, String videoId, 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    int transformationType, int publishType) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                         int transformationType, int publishType) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         JSONObject jsonObject = new JSONObject(); 
														 | 
														
														 | 
														
															         JSONObject jsonObject = new JSONObject(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         jsonObject.put("code", "changwen_video_publish"); 
														 | 
														
														 | 
														
															         jsonObject.put("code", "changwen_video_publish"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															         JSONObject data = new JSONObject(); 
														 | 
														
														 | 
														
															         JSONObject data = new JSONObject(); 
														 |