|
|
@@ -3,6 +3,7 @@ package platform.modules.sys.service;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import platform.common.Constant;
|
|
|
@@ -35,6 +36,9 @@ public class ActivityReviewService extends BaseService<ActivityReview> {
|
|
|
@Autowired
|
|
|
private AttachmentService attachmentService;
|
|
|
|
|
|
+ @Value("${fileUrl}")
|
|
|
+ private String fileUrl;
|
|
|
+
|
|
|
/**
|
|
|
* 获取活动回顾列表
|
|
|
*
|
|
|
@@ -69,10 +73,11 @@ public class ActivityReviewService extends BaseService<ActivityReview> {
|
|
|
// ###**************
|
|
|
// ### 保存视频 wangjiang
|
|
|
Boolean hasVideo = review.getVideoDown() != null;
|
|
|
- review.setHas_video(hasVideo );
|
|
|
+ review.setHas_video(hasVideo);
|
|
|
if (hasVideo) {
|
|
|
- review.setVideo_url(review.getVideoDown().getFile_url());
|
|
|
review.setVideo_attachment_id(review.getVideoDown().getFile_id());
|
|
|
+ Attachment att = attachmentService.findById(review.getVideoDown().getFile_id());
|
|
|
+ review.setVideo_url(att.getFile_url());
|
|
|
}
|
|
|
// ###**************
|
|
|
|
|
|
@@ -109,12 +114,19 @@ public class ActivityReviewService extends BaseService<ActivityReview> {
|
|
|
}
|
|
|
// ###***************
|
|
|
// ### 获取 video
|
|
|
-// if(review.getVideo_attachment_id() != null) {
|
|
|
-// Attachment attachment1 = attachmentService.findById(review.getVideo_attachment_id());
|
|
|
-// if (attachment1 != null) {
|
|
|
-//
|
|
|
-// }
|
|
|
-// }
|
|
|
+ if(review.getVideo_attachment_id() != null) {
|
|
|
+ Attachment attachment1 = attachmentService.findById(review.getVideo_attachment_id());
|
|
|
+ if (attachment1 != null) {
|
|
|
+ FileDown videoDown = new FileDown();
|
|
|
+ videoDown.setFile_id(attachment1.getId());
|
|
|
+ videoDown.setFile_name(attachment1.getFile_name());
|
|
|
+ videoDown.setFile_url(attachment1.getFile_url());
|
|
|
+ review.setVideoDown(videoDown);
|
|
|
+ String file_url = attachment1.getFile_url();
|
|
|
+ file_url = fileUrl + file_url;
|
|
|
+ review.setVideo_url(file_url);
|
|
|
+ }
|
|
|
+ }
|
|
|
// ###**************
|
|
|
review.setBrowse_count(review.getBrowse_count()+1);
|
|
|
this.updateSelective(review);
|