|
@@ -19,6 +19,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.Arrays;
|
|
|
+import java.util.Date;
|
|
|
|
|
|
/**
|
|
|
* @Description: article
|
|
@@ -68,6 +69,7 @@ public class ArticleController extends JeecgController<Article, IArticleService>
|
|
|
@PostMapping(value = "/add")
|
|
|
public Result<String> add(@RequestBody Article article) {
|
|
|
article.setStatus(1);
|
|
|
+ article.setPublishTime(new Date());
|
|
|
articleService.save(article);
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
@@ -83,6 +85,7 @@ public class ArticleController extends JeecgController<Article, IArticleService>
|
|
|
//@RequiresPermissions("article:article:edit")
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
|
|
public Result<String> edit(@RequestBody Article article) {
|
|
|
+ article.setPublishTime(new Date());
|
|
|
articleService.updateById(article);
|
|
|
return Result.OK("编辑成功!");
|
|
|
}
|