Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zhiliao
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
zhiliao
Commits
c27af703
提交
c27af703
authored
5月 06, 2020
作者:
zhouzhigang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
8dc30676
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
38 行增加
和
0 行删除
+38
-0
ResourceLibraryController.java
...controller/resourcelibrary/ResourceLibraryController.java
+21
-0
UpdatePlayStatusForm.java
...m/zrqx/resource/commons/form/bg/UpdatePlayStatusForm.java
+15
-0
ResourceRelation.java
...urce/commons/model/resourcerelation/ResourceRelation.java
+2
-0
没有找到文件。
app/resource/src/main/java/com/zrqx/resource/bg/controller/resourcelibrary/ResourceLibraryController.java
浏览文件 @
c27af703
...
...
@@ -66,6 +66,7 @@ import com.zrqx.resource.commons.form.bg.ClassifyRelationForm;
import
com.zrqx.resource.commons.form.bg.QueryResourceForPoPForm
;
import
com.zrqx.resource.commons.form.bg.QueryResourceRelationForm
;
import
com.zrqx.resource.commons.form.bg.SaveResourceRelationForm
;
import
com.zrqx.resource.commons.form.bg.UpdatePlayStatusForm
;
import
com.zrqx.resource.commons.form.bg.ebook.UpdateEbookRelationForm
;
import
com.zrqx.resource.commons.form.bg.recommend.QueryResourceOneInfoForm
;
import
com.zrqx.resource.commons.form.bg.resource.QueryLibraryForm
;
...
...
@@ -184,6 +185,26 @@ public class ResourceLibraryController {
return
CallBack
.
fail
();
}
}
@ApiOperation
(
value
=
"保存当前视频播放状态"
,
notes
=
"保存当前视频播放状态"
)
@PostMapping
(
value
=
"/relation-resource/update"
)
public
CallBack
<
Boolean
>
updateStatus
(
@RequestBody
UpdatePlayStatusForm
form
){
ResourceRelation
e
=
new
ResourceRelation
();
e
.
setObjectId
(
form
.
getCourseId
());
e
.
setResourceId
(
form
.
getVideoId
());
e
.
setRelationtype
(
1
);
e
.
setResourceType
(
5
);
ResourceRelation
resourceRelation
=
new
ResourceRelation
();
try
{
resourceRelation
=
resourceRelationService
.
selectOne
(
resourceRelation
);
}
catch
(
Exception
e1
)
{
throw
new
BaseException
(
"通过课程id视频id获取课程视频关联关系异常"
);
}
if
(
resourceRelation
!=
null
)
{
resourceRelation
.
setIsPlay
(
"1"
);
}
return
resourceRelationService
.
updateByPrimaryKey
(
resourceRelation
)
?
CallBack
.
success
()
:
CallBack
.
fail
();
}
//关联资源begin
@ApiOperation
(
value
=
"保存相关资源"
,
notes
=
"保存相关资源"
)
...
...
app/resource/src/main/java/com/zrqx/resource/commons/form/bg/UpdatePlayStatusForm.java
0 → 100644
浏览文件 @
c27af703
package
com
.
zrqx
.
resource
.
commons
.
form
.
bg
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
UpdatePlayStatusForm
{
@ApiModelProperty
(
"课程id"
)
private
String
courseId
;
@ApiModelProperty
(
"视频id"
)
private
String
videoId
;
}
app/resource/src/main/java/com/zrqx/resource/commons/model/resourcerelation/ResourceRelation.java
浏览文件 @
c27af703
...
...
@@ -31,5 +31,7 @@ public class ResourceRelation {
private
Date
createTime
;
@ApiModelProperty
(
"1:课程关联关系 2:课程推荐"
)
private
Integer
relationtype
;
@ApiModelProperty
(
"是否是当前播放0否1是"
)
private
String
isPlay
;
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论