| | |
| | | import org.springblade.modules.article.entity.Article; |
| | | import org.springblade.modules.article.service.ArticleService; |
| | | import org.springblade.modules.article.vo.ArticleVo; |
| | | import org.springblade.modules.words.DemoApplication; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | article.setCreateTime(new Date()); |
| | | } |
| | | } |
| | | |
| | | if (article.getContent() != null && article.getContent() != ""){ |
| | | String content = ""; |
| | | content = DemoApplication.interceptWords(article.getContent()); |
| | | article.setContent(content); |
| | | } |
| | | article.setUpdateTime(new Date()); |
| | | return R.status(articleService.saveOrUpdate(article)); |
| | | } |