提交 81e0ef36 authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 22e4cd01
......@@ -82,6 +82,16 @@ public class VideoLibrarySerivceImpl extends BaseServiceImpl<VideoLibrary,String
entity.setClickNum(50);
entity.setSalesNum(0);
mapper.insert(entity);
if(StringUtils.isNotBlank(form.getObjectId())) {
ResourceRelation resourceRelation = new ResourceRelation();
resourceRelation.setCreateTime(new Date());
resourceRelation.setObjectId(form.getObjectId());
resourceRelation.setResourceId(entity.getId());
resourceRelation.setResourceType(ResourceTypeEnum.VIDEO_LIBRARY.getCode());
resourceRelation.setIsTop(form.getIsTop());
resourceRelation.setSort(form.getSort());
resourceRelationMapper.insert(resourceRelation);
}
}else{
//修改
entity.setUpdateTime(new Date());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论