提交 1cdd0ff0 编写于 作者: 喷火的神灵's avatar 喷火的神灵 🎱

视频上传代码修改

上级 bfaefebe
......@@ -142,7 +142,7 @@
<el-avatar src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"></el-avatar>
</div>
<div style="margin-left: 20px;">
<el-input v-model="formInline.textarea1"></el-input>
<el-input v-model="formInline.textarea2"></el-input>
</div>
<div style="margin-left: 30px">
......@@ -339,7 +339,8 @@ export default {
item: [],
send: {commentID: "", parentReplyID: "", replyText: ""},
formInline: {
textarea1: ''
textarea1: '',
textarea2: ''
}
,
dp: "",
......@@ -564,7 +565,7 @@ export default {
},
onSubmit3() {
this.videoComment.videoID = this.videoData
this.videoComment.commentText = this.formInline.textarea1
this.videoComment.commentText = this.formInline.textarea2
console.log(this.send)
insertCommentOfVideo(this.videoComment).then(res => {
this.$message.success(res.message)
......@@ -578,9 +579,18 @@ export default {
console.log("=========", this.allVideoCount)
let idx = this.allVideoCount.videoSrcUrl.lastIndexOf(".");
this.resolution_1080p = this.allVideoCount.videoSrcUrl.slice(0, idx) + "1080.mp4" + this.allVideoCount.videoSrcUrl.slice(idx);
this.resolution_720p = this.allVideoCount.videoSrcUrl.slice(0, idx) + "720.mp4" + this.allVideoCount.videoSrcUrl.slice(idx);
this.resolution_480p = this.allVideoCount.videoSrcUrl.slice(0, idx) + "480.mp4" + this.allVideoCount.videoSrcUrl.slice(idx);
let video = "https://youbili-test.oss-cn-beijing.aliyuncs.com/3-76/3-76-"
this.video_1080p = video + "1080p.mp4"
console.log(this.video_1080p)
this.resolution_1080p = this.allVideoCount.videoSrcUrl + "1080.mp4";
this.resolution_720p = this.allVideoCount.videoSrcUrl + "720.mp4";
this.resolution_480p = this.allVideoCount.videoSrcUrl + "480.mp4";
console.log(this.resolution_1080p)
console.log(this.resolution_720p)
console.log(this.resolution_480p)
} else {
this.$notify.error({
position: 'bottom-right',
......
......@@ -5,14 +5,17 @@ import cn.tedu.youbiliprojectbackend.common.web.response.RestBean;
import cn.tedu.youbiliprojectbackend.modules.social.comment.pojo.param.CommentAddNewParam;
import cn.tedu.youbiliprojectbackend.modules.social.comment.pojo.param.CommentReplyAddNewParam;
import cn.tedu.youbiliprojectbackend.modules.social.comment.service.ICommentService;
import jakarta.validation.constraints.NotNull;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@RestController
@Slf4j
@RequestMapping("/api/auth/comment")
@RequestMapping("/api/auth/comment/")
@Validated
public class CommentController {
@Autowired
private ICommentService service;
......@@ -24,14 +27,14 @@ public class CommentController {
}
@PostMapping("add-new")
public RestBean addNewComment(CommentAddNewParam param, @AuthenticationPrincipal CurrentPrincipal principal) {
public RestBean addNewComment(CommentAddNewParam param, @AuthenticationPrincipal @NotNull(message = "您还为登录") CurrentPrincipal principal) {
service.insertComment(param, principal);
log.warn(param.toString());
return RestBean.success();
}
@PostMapping("/reply/add-new")
public RestBean addNewReply(CommentReplyAddNewParam param, @AuthenticationPrincipal CurrentPrincipal principal) {
public RestBean addNewReply(CommentReplyAddNewParam param, @AuthenticationPrincipal @NotNull(message = "您还为登录") CurrentPrincipal principal) {
service.insertCommentreplie(param, principal);
log.warn(param.toString());
return RestBean.success();
......
......@@ -42,7 +42,7 @@ public class Consumer {
DefaultMQPushConsumer consumer = new DefaultMQPushConsumer("consumer_a33_group");
// consumer.setNamesrvAddr("114.116.107.63:9876");
consumer.setNamesrvAddr("localhost:9876");
consumer.setNamesrvAddr("114.116.107.63:9876");
consumer.subscribe("TopicTest-ZZ", "*");
log.debug("");
//消费模式:广播模式消费 OR 集群模式消费
......@@ -188,9 +188,9 @@ public class Consumer {
log.info("更新视频表信息: duration,videoSrcUrl");
VideoUpdateDTO videoUpdateDTO = new VideoUpdateDTO();
videoUpdateDTO.setVideoID(Long.valueOf(videoID));
videoUpdateDTO.setVideoSrcUrl("http://" + bucketName + "." + end + "/" + ossName);
videoUpdateDTO.setVideoSrcUrl("https://" + bucketName + "." + end + "/" + ossName);
// http:// + bucketName + "." + end + "/" +
videoUpdateDTO.setVideoImgUrl("http://" + bucketNameImg + "." + end + "/" + videoImgUrl);
videoUpdateDTO.setVideoImgUrl("https://" + bucketNameImg + "." + end + "/" + videoImgUrl);
videoUpdateDTO.setDuration(duration);
videoUploadMapper.changeVideoContent(videoUpdateDTO);
......
......@@ -187,7 +187,7 @@ public class VideoUploadController {
}
DefaultMQProducer producer = new DefaultMQProducer("asyncproducer_group22");
producer.setSendMsgTimeout(5000);
producer.setNamesrvAddr("localhost:9876");
producer.setNamesrvAddr("114.116.107.63:9876");
producer.start();
//发送消息
try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册