| | |
| | | import cc.mrbird.febs.mall.entity.MallShop; |
| | | import cc.mrbird.febs.mall.mapper.MallShopMapper; |
| | | import cc.mrbird.febs.mall.service.IMallShopService; |
| | | import cc.mrbird.febs.mall.vo.ApiShopVo; |
| | | import cc.mrbird.febs.mall.vo.ShopListVo; |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ShopListVo> findShopList(ApiShopDto apiShopDto) { |
| | | Page<MallShop> page = new Page<>(apiShopDto.getPageNum(), apiShopDto.getPageSize()); |
| | | |
| | | public List<ApiShopVo> findShopList(ApiShopDto apiShopDto) { |
| | | QueryRequest page = new QueryRequest(); |
| | | page.setPageNum(apiShopDto.getPageNum() - 1); |
| | | page.setPageSize(apiShopDto.getPageSize()); |
| | | MallShop mallShop = BeanUtil.copyProperties(apiShopDto, MallShop.class); |
| | | IPage<MallShop> list = this.baseMapper.selectShopListInPage(mallShop, page); |
| | | return BeanUtil.copyToList(list.getRecords(), ShopListVo.class); |
| | | List<MallShop> list = this.baseMapper.selectShopDistanceList(mallShop, page); |
| | | |
| | | return BeanUtil.copyToList(list, ApiShopVo.class); |
| | | } |
| | | } |