| | |
| | | |
| | | /** |
| | | * 获取 APP 健康科普列表页数据。 |
| | | * |
| | | * @param contentType 内容类型:1 健康知识、2 养生科普;为空则返回全部。 |
| | | */ |
| | | public List<AppHealthPopularizationListItemVO> list() { |
| | | public List<AppHealthPopularizationListItemVO> list(Integer contentType) { |
| | | List<HealthPopularization> items = healthPopularizationMapper.selectList(new LambdaQueryWrapper<HealthPopularization>() |
| | | .eq(HealthPopularization::getDeleted, 0) |
| | | .eq(HealthPopularization::getStatus, STATUS_ENABLED) |
| | | .orderByAsc(HealthPopularization::getSort) |
| | | .eq(contentType != null, HealthPopularization::getContentType, contentType) |
| | | .orderByDesc(HealthPopularization::getSort) |
| | | .orderByDesc(HealthPopularization::getId)); |
| | | if (items == null || items.isEmpty()) { |
| | | return Collections.emptyList(); |
| | |
| | | detailVO.setContent(trimToEmpty(item.getContent())); |
| | | detailVO.setVideoUrl(trimToEmpty(item.getVideoUrl())); |
| | | detailVO.setVideoFileName(trimToEmpty(item.getVideoFileName())); |
| | | detailVO.setVideoDescription(trimToEmpty(item.getVideoDescription())); |
| | | return detailVO; |
| | | } |
| | | |