|
|
@ -193,14 +193,15 @@ public class StoreService {
|
|
|
|
qStore.tel,
|
|
|
|
qStore.tel,
|
|
|
|
qStore.openingHours,
|
|
|
|
qStore.openingHours,
|
|
|
|
qStore.background,
|
|
|
|
qStore.background,
|
|
|
|
qStore.description
|
|
|
|
qStore.description,
|
|
|
|
|
|
|
|
qStore.visitCount
|
|
|
|
)).from(qStore)
|
|
|
|
)).from(qStore)
|
|
|
|
.where(booleanBuilder)
|
|
|
|
.where(booleanBuilder)
|
|
|
|
.orderBy(qStore.createTime.desc())
|
|
|
|
.orderBy(qStore.createTime.desc())
|
|
|
|
.fetch();
|
|
|
|
.fetch();
|
|
|
|
|
|
|
|
|
|
|
|
double lng = Double.parseDouble(storeSearchDto.getLng());
|
|
|
|
double lng = storeSearchDto.getLng() == null ? 0 : Double.parseDouble(storeSearchDto.getLng());
|
|
|
|
double lat = Double.parseDouble(storeSearchDto.getLat());
|
|
|
|
double lat = storeSearchDto.getLng() == null ? 0 : Double.parseDouble(storeSearchDto.getLat());
|
|
|
|
|
|
|
|
|
|
|
|
UUID uuid = UUID.randomUUID();
|
|
|
|
UUID uuid = UUID.randomUUID();
|
|
|
|
redisTemplate.opsForGeo().add(String.valueOf(uuid), new Point(lng, lat), "current");
|
|
|
|
redisTemplate.opsForGeo().add(String.valueOf(uuid), new Point(lng, lat), "current");
|
|
|
@ -209,8 +210,8 @@ public class StoreService {
|
|
|
|
String contact = store.getContact();
|
|
|
|
String contact = store.getContact();
|
|
|
|
if (StringUtils.isNotBlank(contact)) {
|
|
|
|
if (StringUtils.isNotBlank(contact)) {
|
|
|
|
UserInfo byId = userInfoService.findById(contact);
|
|
|
|
UserInfo byId = userInfoService.findById(contact);
|
|
|
|
store.setContactNickName(byId.getNickName());
|
|
|
|
store.setContactNickName(byId == null ? "" : byId.getNickName());
|
|
|
|
store.setContactAvatar(byId.getAvatar());
|
|
|
|
store.setContactAvatar(byId == null ? "" : byId.getAvatar());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
redisTemplate.opsForGeo().add(String.valueOf(uuid),
|
|
|
|
redisTemplate.opsForGeo().add(String.valueOf(uuid),
|
|
|
|