提交 c27af703 authored 作者: zhouzhigang's avatar zhouzhigang

--no commit message

上级 8dc30676
......@@ -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 ="保存相关资源")
......
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;
}
......@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论