处理分页,处理虚拟销量,新增积分商品过滤
This commit is contained in:
@ -281,14 +281,14 @@ public class YxStoreProductServiceImpl extends BaseServiceImpl<StoreProductMappe
|
|||||||
productQueryParam.getLimit());
|
productQueryParam.getLimit());
|
||||||
|
|
||||||
//分页处理
|
//分页处理
|
||||||
wrapper.last("limit "+(productQueryParam.getPage()-1)*productQueryParam.getLimit()+","+productQueryParam.getLimit());
|
//wrapper.last("limit "+(productQueryParam.getPage()-1)*productQueryParam.getLimit()+","+productQueryParam.getLimit());
|
||||||
|
|
||||||
IPage<YxStoreProduct> pageList = storeProductMapper.selectPage(pageModel, wrapper);
|
IPage<YxStoreProduct> pageList = storeProductMapper.selectPage(pageModel, wrapper);
|
||||||
|
|
||||||
//处理虚拟销量
|
//处理虚拟销量
|
||||||
for (YxStoreProduct vo: pageList.getRecords()) {
|
// for (YxStoreProduct vo: pageList.getRecords()) {
|
||||||
vo.setSales(vo.getSales()+vo.getFicti());
|
// vo.setSales(vo.getSales()+vo.getFicti());
|
||||||
}
|
// }
|
||||||
|
|
||||||
List<YxStoreProductQueryVo> list = generator.convert(pageList.getRecords(), YxStoreProductQueryVo.class);
|
List<YxStoreProductQueryVo> list = generator.convert(pageList.getRecords(), YxStoreProductQueryVo.class);
|
||||||
|
|
||||||
@ -416,7 +416,7 @@ public class YxStoreProductServiceImpl extends BaseServiceImpl<StoreProductMappe
|
|||||||
wrapper.eq(YxStoreProduct::getIsShow, ShopCommonEnum.SHOW_1.getValue())
|
wrapper.eq(YxStoreProduct::getIsShow, ShopCommonEnum.SHOW_1.getValue())
|
||||||
.eq(YxStoreProduct::getIsDel,ShopCommonEnum.DELETE_0.getValue())
|
.eq(YxStoreProduct::getIsDel,ShopCommonEnum.DELETE_0.getValue())
|
||||||
.orderByDesc(YxStoreProduct::getSort);
|
.orderByDesc(YxStoreProduct::getSort);
|
||||||
|
wrapper.eq(YxStoreProduct::getIsIntegral,0);
|
||||||
// order
|
// order
|
||||||
switch (ProductEnum.toType(order)) {
|
switch (ProductEnum.toType(order)) {
|
||||||
//精品推荐
|
//精品推荐
|
||||||
@ -445,10 +445,10 @@ public class YxStoreProductServiceImpl extends BaseServiceImpl<StoreProductMappe
|
|||||||
|
|
||||||
IPage<YxStoreProduct> pageList = storeProductMapper.selectPage(pageModel, wrapper);
|
IPage<YxStoreProduct> pageList = storeProductMapper.selectPage(pageModel, wrapper);
|
||||||
|
|
||||||
//处理虚拟销量
|
//处理虚拟销量(sql已处理,去掉代码处理)
|
||||||
for (YxStoreProduct vo: pageList.getRecords()) {
|
// for (YxStoreProduct vo: pageList.getRecords()) {
|
||||||
vo.setSales(vo.getSales()+vo.getFicti());
|
// vo.setSales(vo.getSales()+vo.getFicti());
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
return generator.convert(pageList.getRecords(), YxStoreProductQueryVo.class);
|
return generator.convert(pageList.getRecords(), YxStoreProductQueryVo.class);
|
||||||
|
Reference in New Issue
Block a user