循环依赖
This commit is contained in:
@@ -20,6 +20,7 @@ import com.czg.sa.MyStpLogic;
|
|||||||
import com.czg.sa.StpKit;
|
import com.czg.sa.StpKit;
|
||||||
import com.czg.service.RedisService;
|
import com.czg.service.RedisService;
|
||||||
import com.czg.service.account.mapper.ShopInfoMapper;
|
import com.czg.service.account.mapper.ShopInfoMapper;
|
||||||
|
import com.czg.service.account.mapper.ShopUserMapper;
|
||||||
import com.czg.system.dto.SysParamsDTO;
|
import com.czg.system.dto.SysParamsDTO;
|
||||||
import com.czg.system.service.SysParamsService;
|
import com.czg.system.service.SysParamsService;
|
||||||
import com.czg.utils.AssertUtil;
|
import com.czg.utils.AssertUtil;
|
||||||
@@ -61,7 +62,7 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
|||||||
@Resource
|
@Resource
|
||||||
private ShopTableService shopTableService;
|
private ShopTableService shopTableService;
|
||||||
@Resource
|
@Resource
|
||||||
private ShopUserService shopUserService;
|
private ShopUserMapper shopUserMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private ShopExtendService shopExtendService;
|
private ShopExtendService shopExtendService;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -353,7 +354,7 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
|||||||
distance = GeoUtil.getDistance(Long.parseLong(shopInfo.getLat()), Long.parseLong(shopInfo.getLng()), Long.parseLong(lat), Long.parseLong(lng));
|
distance = GeoUtil.getDistance(Long.parseLong(shopInfo.getLat()), Long.parseLong(shopInfo.getLng()), Long.parseLong(lat), Long.parseLong(lng));
|
||||||
}
|
}
|
||||||
|
|
||||||
ShopUser shopUser = shopUserService.queryChain().eq(ShopUser::getUserId, StpKit.USER.getLoginIdAsLong()).one();
|
ShopUser shopUser = shopUserMapper.selectOneByQuery(new QueryWrapper().eq(ShopUser::getUserId, StpKit.USER.getLoginIdAsLong()));
|
||||||
List<ShopExtend> shopExtends = shopExtendService.listInfo(shopInfo.getId(), null);
|
List<ShopExtend> shopExtends = shopExtendService.listInfo(shopInfo.getId(), null);
|
||||||
Map<String, ShopExtend> shopExtendMap = shopExtends.stream().collect(Collectors.toMap(ShopExtend::getAutoKey, i -> i));
|
Map<String, ShopExtend> shopExtendMap = shopExtends.stream().collect(Collectors.toMap(ShopExtend::getAutoKey, i -> i));
|
||||||
return new ShopInfoByCodeDTO(distance, shopInfo, shopExtendMap, shopTable, shopUser != null && shopUser.getIsVip() != null && shopUser.getIsVip() == 1);
|
return new ShopInfoByCodeDTO(distance, shopInfo, shopExtendMap, shopTable, shopUser != null && shopUser.getIsVip() != null && shopUser.getIsVip() == 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user