Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
代码敲不队
YoubiliProject
提交
1cdd0ff0
Y
YoubiliProject
项目概览
代码敲不队
/
YoubiliProject
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
YoubiliProject
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1cdd0ff0
编写于
7月 28, 2023
作者:
喷火的神灵
🎱
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
视频上传代码修改
上级
bfaefebe
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
26 addition
and
13 deletion
+26
-13
YouBili_front/src/views/video/videoIndex.vue
YouBili_front/src/views/video/videoIndex.vue
+16
-6
youbili-project-backend/src/main/java/cn/tedu/youbiliprojectbackend/modules/social/comment/controller/CommentController.java
.../modules/social/comment/controller/CommentController.java
+6
-3
youbili-project-backend/src/main/java/cn/tedu/youbiliprojectbackend/modules/video/uplaod/controller/Consumer.java
...jectbackend/modules/video/uplaod/controller/Consumer.java
+3
-3
youbili-project-backend/src/main/java/cn/tedu/youbiliprojectbackend/modules/video/uplaod/controller/VideoUploadController.java
...odules/video/uplaod/controller/VideoUploadController.java
+1
-1
未找到文件。
YouBili_front/src/views/video/videoIndex.vue
浏览文件 @
1cdd0ff0
...
...
@@ -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.textarea
1
"
></el-input>
<el-input
v-model=
"formInline.textarea
2
"
></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
.
textarea
1
this
.
videoComment
.
commentText
=
this
.
formInline
.
textarea
2
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
'
,
...
...
youbili-project-backend/src/main/java/cn/tedu/youbiliprojectbackend/modules/social/comment/controller/CommentController.java
浏览文件 @
1cdd0ff0
...
...
@@ -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
();
...
...
youbili-project-backend/src/main/java/cn/tedu/youbiliprojectbackend/modules/video/uplaod/controller/Consumer.java
浏览文件 @
1cdd0ff0
...
...
@@ -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
(
"http
s
://"
+
bucketName
+
"."
+
end
+
"/"
+
ossName
);
// http:// + bucketName + "." + end + "/" +
videoUpdateDTO
.
setVideoImgUrl
(
"http://"
+
bucketNameImg
+
"."
+
end
+
"/"
+
videoImgUrl
);
videoUpdateDTO
.
setVideoImgUrl
(
"http
s
://"
+
bucketNameImg
+
"."
+
end
+
"/"
+
videoImgUrl
);
videoUpdateDTO
.
setDuration
(
duration
);
videoUploadMapper
.
changeVideoContent
(
videoUpdateDTO
);
...
...
youbili-project-backend/src/main/java/cn/tedu/youbiliprojectbackend/modules/video/uplaod/controller/VideoUploadController.java
浏览文件 @
1cdd0ff0
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录