From 348c31586dd48dcc25402bf9a1130310b4709890 Mon Sep 17 00:00:00 2001 From: huangyw <1207046171@qq.com> Date: Tue, 3 Sep 2024 08:14:39 +0800 Subject: [PATCH] =?UTF-8?q?release:=20APP=20=E9=97=A8=E5=BA=97=E9=98=B2?= =?UTF-8?q?=E5=91=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/luoo/user/service/StoreService.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/luoo_user/src/main/java/com/luoo/user/service/StoreService.java b/luoo_user/src/main/java/com/luoo/user/service/StoreService.java index 80db7e5..d02686b 100644 --- a/luoo_user/src/main/java/com/luoo/user/service/StoreService.java +++ b/luoo_user/src/main/java/com/luoo/user/service/StoreService.java @@ -193,14 +193,15 @@ public class StoreService { qStore.tel, qStore.openingHours, qStore.background, - qStore.description + qStore.description, + qStore.visitCount )).from(qStore) .where(booleanBuilder) .orderBy(qStore.createTime.desc()) .fetch(); - double lng = Double.parseDouble(storeSearchDto.getLng()); - double lat = Double.parseDouble(storeSearchDto.getLat()); + double lng = storeSearchDto.getLng() == null ? 0 : Double.parseDouble(storeSearchDto.getLng()); + double lat = storeSearchDto.getLng() == null ? 0 : Double.parseDouble(storeSearchDto.getLat()); UUID uuid = UUID.randomUUID(); redisTemplate.opsForGeo().add(String.valueOf(uuid), new Point(lng, lat), "current"); @@ -209,8 +210,8 @@ public class StoreService { String contact = store.getContact(); if (StringUtils.isNotBlank(contact)) { UserInfo byId = userInfoService.findById(contact); - store.setContactNickName(byId.getNickName()); - store.setContactAvatar(byId.getAvatar()); + store.setContactNickName(byId == null ? "" : byId.getNickName()); + store.setContactAvatar(byId == null ? "" : byId.getAvatar()); } redisTemplate.opsForGeo().add(String.valueOf(uuid),