提交 5f59c5ad authored 作者: liupengfei's avatar liupengfei

--no commit message

上级 f8bc2f51
......@@ -129,14 +129,21 @@ public class VideoLibraryController {
VideoLibrary videoLibrary = service.selectByPrimaryKey(f);
if(!videoLibrary.getSalesType().equals(form.getSalesType())) {
videoLibrary.setCourseId(null);
service.updateByPrimaryKey(videoLibrary);
service.updateByPrimaryKey(videoLibrary);
}
});
}
if(form.getSalesType() != null && form.getSalesType() == 2){
form.getIds().forEach(f -> {
VideoLibrary videoLibrary = service.selectByPrimaryKey(f);
if(!videoLibrary.getSalesType().equals(form.getSalesType())) {
//删除推荐位资源
Example example1 = new Example(RecommendResource.class);
example1.createCriteria().andIn("resId", form.getIds());
recommendResourceService.deleteByExample(example);
example1.createCriteria().andEqualTo("resId", f);
recommendResourceService.deleteByExample(example1);
}
});
}
}
entity.setSalesType(form.getSalesType());
entity.setUpdateTime(new Date());
if(!service.UpdateByExampleSelective(entity,example)){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论