luodangjia
2025-02-06 4ea15c3e2a3f0434df79a1b49fe4e90f7337b025
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java
@@ -143,6 +143,9 @@
        if (shopDetailVO == null) {
            throw new ServiceException("查询店铺不存在");
        }
        if (shopDetailVO.getStatus().equals(2)){
            throw new ServiceException("店铺已冻结");
        }
        ShopScore one = shopScoreService.getOne(new LambdaQueryWrapper<ShopScore>().eq(ShopScore::getAppUserId, userid).eq(ShopScore::getShopId, shopId).last(" order by create_time desc limit 0, 1"));
        shopDetailVO.setMyScore(null == one ? BigDecimal.ZERO : one.getScore());
        // 计算距离