|
|
|
@ -306,7 +306,7 @@ public class JournalService {
|
|
|
|
|
List<String> recommendIds=journalTagDao.recommendByJournalId(id);
|
|
|
|
|
List<String> extraIds=Collections.emptyList();
|
|
|
|
|
if(recommendIds.size()<6) {
|
|
|
|
|
extraIds=journalDao.random(6-recommendIds.size(),recommendIds);
|
|
|
|
|
extraIds=recommendIds.isEmpty()?journalDao.random(6):journalDao.random(6-recommendIds.size(),recommendIds);
|
|
|
|
|
}
|
|
|
|
|
if(!extraIds.isEmpty()) {
|
|
|
|
|
recommendIds.addAll(extraIds);
|
|
|
|
|