书评bug
This commit is contained in:
@@ -12,6 +12,7 @@ import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import com.peanut.common.utils.Query;
|
||||
import com.peanut.common.utils.ReadProvinceUtil;
|
||||
import com.peanut.modules.book.dao.BookDao;
|
||||
import com.peanut.modules.book.dao.BookForumArticlesDao;
|
||||
import com.peanut.modules.book.entity.*;
|
||||
import com.peanut.modules.book.service.*;
|
||||
import com.peanut.modules.book.vo.BookIndexVo;
|
||||
@@ -67,6 +68,8 @@ public class BookController {
|
||||
private ShopProductToLabelService shopProductToLabelService;
|
||||
@Autowired
|
||||
private MedicaldesBookService medicaldesBookService;
|
||||
@Autowired
|
||||
private BookForumArticlesDao bookForumArticlesDao;
|
||||
final ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10);
|
||||
|
||||
/**
|
||||
@@ -745,6 +748,12 @@ public class BookController {
|
||||
}
|
||||
bookEntityPage = bookService.getBaseMapper().selectPage(new Page<>(page, limit), wrapper1);
|
||||
}
|
||||
for (BookEntity b:bookEntityPage.getRecords()){
|
||||
LambdaQueryWrapper<BookForumArticlesEntity> bookForumArticlesEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
bookForumArticlesEntityLambdaQueryWrapper.eq(BookForumArticlesEntity::getBookid,b.getId());
|
||||
Integer integer = bookForumArticlesDao.selectCount(bookForumArticlesEntityLambdaQueryWrapper);
|
||||
b.setForumNum(integer);
|
||||
}
|
||||
|
||||
return R.ok().put("page",bookEntityPage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user