jiangqs
2023-05-12 5f159dab33dce77f05472b16045ab6ca4f48d07b
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());