| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.account.api.model.AppUserShop; |
| | |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "门店列表", tags = {"后台管理-门店管理-门店列表"}) |
| | | public R<List<Shop>> list(@ApiParam("页码") @RequestParam Integer PageNum,@ApiParam("每一页数据大小") Integer pageSize,Shop shop){ |
| | | List<Shop> list = shopService.list(); |
| | | return null; |
| | | public R<IPage<Shop>> list(@ApiParam("页码") @RequestParam Integer PageNum,@ApiParam("每一页数据大小") Integer pageSize,Shop shop){ |
| | | IPage<Shop> shopIPage = shopService.getShopList(PageNum, pageSize, shop); |
| | | return R.ok(shopIPage); |
| | | } |
| | | |
| | | |
| | |
| | | package com.ruoyi.other.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.other.api.domain.Shop; |
| | | import com.ruoyi.other.vo.NearbyShopVO; |
| | | import com.ruoyi.other.vo.ShopDetailVO; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author luodangjia |
| | |
| | | */ |
| | | public interface ShopService extends IService<Shop> { |
| | | |
| | | List<Shop> getShopList(Shop shop); |
| | | IPage<Shop> getShopList(Integer PageNum, Integer pageSize, Shop shop); |
| | | |
| | | List<NearbyShopVO> nearbyShopList(BigDecimal longitude, BigDecimal latitude); |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | |
| | | |
| | | |
| | | @Override |
| | | public List<Shop> getShopList(Shop shop) { |
| | | IPage<Shop> shopIPage = shopMapper.selectShopList(null, null); |
| | | return shopIPage.getRecords(); |
| | | public IPage<Shop> getShopList(Integer PageNum, Integer pageSize, Shop shop) { |
| | | Page<Shop> page = new Page<>(); |
| | | page.setCurrent(PageNum); |
| | | page.setSize(pageSize); |
| | | IPage<Shop> shopIPage = shopMapper.selectShopList(page, shop); |
| | | return shopIPage; |
| | | } |
| | | |
| | | @Override |