| | |
| | | import com.ruoyi.article.domain.pojo.Article; |
| | | import com.ruoyi.article.dto.ArticleDTO; |
| | | import com.ruoyi.article.service.IArticleService; |
| | | import com.ruoyi.article.vo.ArticleCommentsVO; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.page.PageDTO; |
| | | import com.ruoyi.system.api.domain.MemberAddress; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public class ArticleController { |
| | | @Resource |
| | | private IArticleService iArticleService; |
| | | |
| | | @PostMapping("/getArticleList") |
| | | @ResponseBody |
| | | @ApiOperation(value = "获取资讯") |
| | |
| | | public R<PageDTO<Article>> getMemberArticleList(ArticleDTO articleDTO) { |
| | | return R.ok(iArticleService.getMemberArticleList(articleDTO)); |
| | | } |
| | | |
| | | @PostMapping("/saveMemberArticle") |
| | | @ResponseBody |
| | | @ApiOperation(value = "添加或者修改用户资讯") |
| | | public R<T> saveMemberArticle(ArticleDTO articleDTO) { |
| | | iArticleService.saveMemberArticle(articleDTO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/delMemberArticle") |
| | | @ResponseBody |
| | | @ApiOperation(value = "删除用户资讯") |
| | | public R<T> delMemberArticle(ArticleDTO articleDTO) { |
| | | iArticleService.delMemberArticle(articleDTO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/getMemberArticleInfo") |
| | | @ResponseBody |
| | | @ApiOperation(value = "获取资讯详情") |
| | | public R<Article> getMemberArticleInfo(ArticleDTO articleDTO) { |
| | | return R.ok(iArticleService.getMemberArticleInfo(articleDTO)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @PostMapping("/getArticleCommentsList") |
| | | @ResponseBody |
| | | @ApiOperation(value = "获取评论列表") |
| | | public R<PageDTO<ArticleCommentsVO>> getArticleCommentsList(ArticleDTO articleDTO) { |
| | | return R.ok(iArticleService.getArticleCommentsList(articleDTO)); |
| | | } |
| | | |
| | | @PostMapping("/getreport") |
| | | @ResponseBody |
| | | @ApiOperation(value = "用户举报举报文章") |
| | | public R<T> getReport(ArticleDTO articleDTO) { |
| | | iArticleService.getReport(articleDTO); |
| | | return R.ok(); |
| | | } |
| | | } |