1.
phpcjl
2024-12-11 31e915fdf6dc9dbed805be69d8e1859c44d314da
1.
3个文件已修改
24 ■■■■■ 已修改文件
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -2,6 +2,7 @@
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;
@@ -106,9 +107,9 @@
    @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);
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/ShopService.java
@@ -1,16 +1,19 @@
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
@@ -18,7 +21,7 @@
 */
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);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java
@@ -2,6 +2,7 @@
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;
@@ -43,9 +44,12 @@
    @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