新版
This commit is contained in:
@@ -59,6 +59,8 @@ public class BookController {
|
||||
private ShopProductService shopProductService;
|
||||
@Autowired
|
||||
private ShopProudictBookService shopProudictBookService;
|
||||
@Autowired
|
||||
private ShopProductToLabelService shopProductToLabelService;
|
||||
final ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10);
|
||||
|
||||
/**
|
||||
@@ -82,6 +84,21 @@ public class BookController {
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取精品图书
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getJPBooks")
|
||||
public R getJPBooks(){
|
||||
LambdaQueryWrapper<ShopProductToLabelEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ShopProductToLabelEntity::getSplId,5);//精选图书
|
||||
wrapper.eq(ShopProductToLabelEntity::getDelFlag,0);
|
||||
List<Integer> pIds = shopProductToLabelService.getBaseMapper().selectList(wrapper).stream().map(ShopProductToLabelEntity::getProductId).collect(Collectors.toList());
|
||||
|
||||
List<ShopProductEntity> shopProductEntities = shopProductService.getBaseMapper().selectList(new LambdaQueryWrapper<ShopProductEntity>().in(ShopProductEntity::getProductId, pIds));
|
||||
return R.ok().put("Products",shopProductEntities);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user