|
|
|
@ -11,6 +11,8 @@ import com.luoo.music.pojo.UserInfo;
|
|
|
|
|
import com.luoo.music.util.Constants;
|
|
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.data.domain.Example;
|
|
|
|
|
import org.springframework.data.domain.ExampleMatcher;
|
|
|
|
|
import org.springframework.data.domain.Page;
|
|
|
|
|
import org.springframework.data.domain.PageRequest;
|
|
|
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
|
|
@ -101,7 +103,18 @@ public class CMSArticleService {
|
|
|
|
|
article.setPubTime(LocalDateTime.now());
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
articleDao.save(article);
|
|
|
|
|
Example<Article> example = Example.of(article, ExampleMatcher.matching()
|
|
|
|
|
.withIgnorePaths("id")
|
|
|
|
|
.withIgnorePaths("image")
|
|
|
|
|
.withIgnorePaths("pubTime")
|
|
|
|
|
.withIgnorePaths("createTime")
|
|
|
|
|
.withIgnorePaths("updateTime")
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
if(!articleDao.exists(example)) {
|
|
|
|
|
articleDao.save(article);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return Result.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|