jiangqs
2023-05-17 7b005ca364613c9738dbc66f3e4fe3fb7bec043d
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());