| | |
| | | package com.ruoyi.shop.service.impl.shop; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.shop.domain.dto.*; |
| | | import com.ruoyi.shop.domain.pojo.shop.*; |
| | |
| | | import com.ruoyi.shop.mapper.shop.ShopMapper; |
| | | import com.ruoyi.shop.service.shop.*; |
| | | import com.ruoyi.shop.util.CodeFactoryUtil; |
| | | import com.ruoyi.system.api.RemoteActivityService; |
| | | import com.ruoyi.system.api.RemoteConfigService; |
| | | import com.ruoyi.system.api.RemoteUserService; |
| | | import com.ruoyi.system.api.domain.poji.activity.ActivityGoods; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import com.ruoyi.system.api.domain.poji.sys.SysUser; |
| | |
| | | public AppNearbyShopVo getNearbyShop(AppNearbyShopDto appNearbyShopDto,Member member){ |
| | | AppNearbyShopVo appNearbyShopVo = new AppNearbyShopVo(); |
| | | Shop shop = null; |
| | | if(member.getRealtionShopId()!=null){ |
| | | if(member.getRelationShopId()!=null){ |
| | | //获取绑定商户 |
| | | shop = this.getById(member.getRealtionShopId()); |
| | | shop = this.getById(member.getRelationShopId()); |
| | | }else{ |
| | | //获取附近商户 |
| | | shop = this.getById(1L); |
| | |
| | | appNearbyShopVo.setShopLongitude(shop.getShopLongitude()); |
| | | return appNearbyShopVo; |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * @param shopId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Shop getByShopId(Long shopId){ |
| | | LambdaQueryWrapper<Shop> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.eq(Shop::getDelFlag, 0).eq(Shop::getShopId, shopId); |
| | | Shop shop = this.getOne(queryWrapper); |
| | | return shop; |
| | | } |
| | | } |