| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopStoreDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.shop.*; |
| | | import com.panzhihua.common.model.vos.shop.PageShopStoreVO; |
| | | import com.panzhihua.common.model.vos.shop.PageShopStoreVO; |
| | | import com.panzhihua.service_community.dao.ComShopGoodsAttrDAO; |
| | | import com.panzhihua.service_community.dao.ComShopGoodsDAO; |
| | | import com.panzhihua.common.model.vos.shop.PageShopStoreVO; |
| | | import com.panzhihua.common.model.vos.shop.ShopStoreVO; |
| | | import com.panzhihua.service_community.dao.ComShopStoreDAO; |
| | | import com.panzhihua.service_community.model.dos.ComShopStoreDO; |
| | | import com.panzhihua.service_community.service.ComShopStoreService; |
| | |
| | | |
| | | @Resource |
| | | private ComShopGoodsDAO shopGoodsDAO; |
| | | @Resource |
| | | private ComShopGoodsAttrDAO comShopGoodsAttrDAO; |
| | | |
| | | /** |
| | | * 查询店铺列表 |
| | |
| | | |
| | | //查询店铺下商品信息 |
| | | Page page = new Page<>(comShopStoreDTO.getPageNum(), comShopStoreDTO.getPageSize()); |
| | | shopStoreVO.setGoodsList(shopGoodsDAO.pageShopGoodsByStoreId(page, comShopStoreDTO).getRecords()); |
| | | |
| | | List<ComShopGoodsVO> goodsList = shopGoodsDAO.pageShopGoodsByStoreId(page, comShopStoreDTO).getRecords(); |
| | | if(!goodsList.isEmpty()){ |
| | | //查询商品规格列表 |
| | | goodsList.forEach(goods -> { |
| | | List<ComShopGoodsAttrVO> goodsAttrList = comShopGoodsAttrDAO.getGoodsAttr(goods.getId()); |
| | | if(!goodsAttrList.isEmpty()){ |
| | | goods.setGoodsAttrList(goodsAttrList); |
| | | } |
| | | }); |
| | | } |
| | | shopStoreVO.setGoodsList(goodsList); |
| | | return R.ok(shopStoreVO); |
| | | |
| | | } |