| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import io.lettuce.core.dynamic.annotation.Param; |
| | | import org.springblade.modules.article.entity.Article; |
| | | import org.springblade.modules.article.mapper.ArticleMapper; |
| | | import org.springblade.modules.article.service.ArticleService; |
| | | import org.springblade.modules.article.vo.ArticleVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhongrj |
| | |
| | | |
| | | public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> implements ArticleService { |
| | | |
| | | |
| | | /** |
| | | * 查询资讯分页信息 |
| | | * @param page |
| | |
| | | */ |
| | | @Override |
| | | public IPage<Article> selectArticlePage(IPage<Article> page, ArticleVO article) { |
| | | return page.setRecords(baseMapper.selectArticlePage(page,article)); |
| | | return page.setRecords(baseMapper.selectArticlePage(page, article)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public IPage<ArticleVO> selectArticlePageByApp(IPage<ArticleVO> page, ArticleVO article) { |
| | | return page.setRecords(baseMapper.selectArticlePageByApp(page,article)); |
| | | // 查询用户小区的id |
| | | String districId = baseMapper.getDistrictId(article.getHouseCode()); |
| | | article.setDistrictId(districId); |
| | | List<ArticleVO> articleVOS = baseMapper.selectArticlePageByApp(page, article); |
| | | return page.setRecords(articleVOS); |
| | | } |
| | | |
| | | @Override |