From 5f159dab33dce77f05472b16045ab6ca4f48d07b Mon Sep 17 00:00:00 2001 From: jiangqs <jiangqs> Date: 星期五, 12 五月 2023 16:49:39 +0800 Subject: [PATCH] DEMO完成 --- ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java index c7d149e..9f3cec6 100644 --- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java +++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopServiceImpl.java @@ -334,15 +334,14 @@ public AppNearbyShopVo getNearbyShop(AppNearbyShopDto appNearbyShopDto,Member member){ AppNearbyShopVo appNearbyShopVo = new AppNearbyShopVo(); Shop shop = null; - if(member.getRelationShopId()!=null){ + //获取附近商户 + AppNearShopVo appNearShopVo = shopMapper.getNearbyShop(appNearbyShopDto); + shop = this.getById(appNearShopVo.getShopId()); + if(member!=null&&member.getRelationShopId()!=null){ //获取绑定商户 shop = this.getById(member.getRelationShopId()); - }else{ - //获取附近商户 - AppNearShopVo appNearShopVo = shopMapper.getNearbyShop(appNearbyShopDto); - shop = this.getById(appNearShopVo.getShopId()); } - if(member.getBindingFlag()!=1){ + if(member!=null&&member.getBindingFlag()!=1){ AppMemberBindingDto appMemberBindingDto = new AppMemberBindingDto(); appMemberBindingDto.setShopId(shop.getShopId()); appMemberBindingDto.setUserId(member.getUserId()); -- Gitblit v1.7.1