提交 3361f92e authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 344d7e94
......@@ -70,9 +70,13 @@ public class ArticleLibraryController {
@PostMapping(value = ResourceRequestPath.SAVE)
public CallBack<Boolean> save(@RequestBody SaveUpdateArticleLibraryForm form)
throws IOException, ParseException {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
ArticleLibrary entity = new ArticleLibrary();
BeanUtils.copyProperties(form, entity);
if(entity.getId() == null){
if(form.getTimingTime()!=null && form.getTimingTime()!=""){
entity.setTimingTime(df.parse(form.getTimingTime()));
}
entity.setResourceType(2);
entity.setIsDelete(0);
entity.setPublishStatus(form.getPublishStatus());
......@@ -86,6 +90,9 @@ public class ArticleLibraryController {
}else{
entity = articleService.selectByPrimaryKey(entity.getId());
BeanUtils.copyProperties(form, entity);
if(form.getTimingTime()!=null && form.getTimingTime()!=""){
entity.setTimingTime(df.parse(form.getTimingTime()));
}
entity.setUpdateTime(new Date());
articleService.updateByPrimaryKey(entity );
ResourceRelation res =new ResourceRelation();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论