图书类型 增加全部选择项

This commit is contained in:
wuchunlei
2024-01-09 15:30:36 +08:00
parent be33a443dc
commit bab3941807

View File

@@ -115,7 +115,13 @@ public class ShopProductLabelController {
if (type!=null){
wrapper.leftJoin(MedicaldesBook.class, MedicaldesBook::getBookId,ShopProduct::getBookId);
wrapper.inSql(ShopProduct::getProductId,"select product_id from shop_product where book_Ids not like \"%,%\"");
wrapper.eq(MedicaldesBook::getTypeId,type);
if(type==0){//0为医学图书全部
wrapper.in(MedicaldesBook::getTypeId,1,2,3,4);
}else if (type == -1) {//-1为文哲图书全部
wrapper.in(MedicaldesBook::getTypeId,5,6);
}else {
wrapper.eq(MedicaldesBook::getTypeId,type);
}
}
Page<ShopProduct> shopProductEntityPage = shopProductToLabelDao.selectJoinPage(new Page<ShopProduct>(page, limit),
ShopProduct.class, wrapper);