| | |
| | | }else{ |
| | | voList = baseMapper.getMeditationListByTagId(null, null); |
| | | } |
| | | voList = handlePaidMeditation(voList); |
| | | if(voList.isEmpty()){ |
| | | voList = baseMapper.getMeditationListByTagId(null, null); |
| | | voList = voList.stream().limit(1).collect(Collectors.toList()); |
| | | } |
| | | return voList; |
| | | }else{ |
| | | voList = baseMapper.getMeditationListByTagId(null, null); |
| | | voList = voList.stream().limit(1).collect(Collectors.toList()); |
| | | return voList; |
| | | } |
| | | } |
| | |
| | | if (tokenService.getLoginUser()!=null){ |
| | | Integer data2 = remoteOrderService.getMeditationIsBuy(tokenService.getLoginUser().getUserid(), id).getData(); |
| | | vo.setIsBuy(data2); |
| | | List<MeditationUserFavorite> list = meditationUserFavoriteService.lambdaQuery() |
| | | .eq(MeditationUserFavorite::getMeditationId, id) |
| | | .eq(MeditationUserFavorite::getAppUserId, tokenService.getLoginUser().getUserid()).list(); |
| | | |
| | | if (list.isEmpty()){ |
| | | vo.setFavorite(2); |
| | | }else{ |
| | | vo.setFavorite(1); |
| | | } |
| | | } |
| | | |
| | | |
| | | return R.ok(vo); |
| | | } |
| | | @Override |