|
|
@@ -170,10 +170,14 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements Go
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public Result selectGoodsList(Long shopId, Double lng, Double lat) {
|
|
|
+ public Result selectGoodsList(Long shopId, Double lng, Double lat,Integer page, Integer limit) {
|
|
|
GoodsShop goodsShop = goodsShopDao.selectGoodsList(shopId, lng, lat);
|
|
|
//List<Goods> goodsList = goodsDao.selectGoodsClassifyList(shopId);
|
|
|
- List<GoodsClassify> goodsClassifies = goodsDao.selectAllClassifyList(null, shopId);
|
|
|
+ Page<GoodsClassify> pages = new Page<>(page,limit);
|
|
|
+ IPage<GoodsClassify> goodsClassifyIPage = goodsDao.selectAllClassify(pages,null, shopId);
|
|
|
+// List<GoodsClassify> goodsClassifyIPage = goodsDao.selectAllClassifyList(null, shopId);
|
|
|
+
|
|
|
+ List<GoodsClassify> goodsClassifies = goodsClassifyIPage.getRecords();
|
|
|
List<Map<String, Object>> list = new ArrayList<>();
|
|
|
for (int i = 0; i < goodsClassifies.size(); i++) {
|
|
|
Map<String, Object> hashMap = new HashMap<>();
|
|
|
@@ -197,6 +201,10 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsDao, Goods> implements Go
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
result.put("goodsShop", goodsShop);
|
|
|
result.put("list", list);
|
|
|
+ result.put("pages", goodsClassifyIPage.getPages());
|
|
|
+ result.put("current", goodsClassifyIPage.getCurrent());
|
|
|
+ result.put("size", goodsClassifyIPage.getSize());
|
|
|
+ result.put("total", goodsClassifyIPage.getTotal());
|
|
|
return Result.success().put("data", result);
|
|
|
}
|
|
|
|