| | |
| | | package com.ruoyi.article.controller; |
| | | |
| | | |
| | | import com.ruoyi.article.domain.pojo.Article; |
| | | import com.ruoyi.article.dto.ArticleDTO; |
| | | import com.ruoyi.article.service.IArticleService; |
| | | 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.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/article") |
| | | public class ArticleController { |
| | | @Resource |
| | | private IArticleService iArticleService; |
| | | @PostMapping("/getArticleList") |
| | | @ResponseBody |
| | | @ApiOperation(value = "获取资讯") |
| | | public R<PageDTO<Article>> getArticleList(ArticleDTO articleDTO) { |
| | | return R.ok(iArticleService.getArticleList(articleDTO)); |
| | | } |
| | | |
| | | @PostMapping("/getMemberArticleList") |
| | | @ResponseBody |
| | | @ApiOperation(value = "获取用户资讯") |
| | | public R<PageDTO<Article>> getMemberArticleList(ArticleDTO articleDTO) { |
| | | return R.ok(iArticleService.getMemberArticleList(articleDTO)); |
| | | } |
| | | } |