diff --git a/admin/src/main/java/com/baiye/modules/distribute/service/impl/StoreServiceImpl.java b/admin/src/main/java/com/baiye/modules/distribute/service/impl/StoreServiceImpl.java index e8894a6..e5f6125 100644 --- a/admin/src/main/java/com/baiye/modules/distribute/service/impl/StoreServiceImpl.java +++ b/admin/src/main/java/com/baiye/modules/distribute/service/impl/StoreServiceImpl.java @@ -64,10 +64,17 @@ public class StoreServiceImpl extends ExtendServiceImpl sysUserNameRoleS = sysUserService.listUserNameByUserIds(userIds); userInfo = sysUserNameRoleS.stream().collect(Collectors.toMap(SysUserNameRoleDTO::getUserId, SysUserNameRoleDTO::getUserName)); } - + String city = ""; + String province = ""; + String county = ""; + String detail = ""; for (StoreVO vo : records) { vo.setReservationNum(map.get(vo.getId())); - vo.setAddress(vo.getCity() + vo.getCounty()); + city = vo.getCity(); + province = vo.getProvince(); + county = vo.getCounty(); + detail = vo.getDetail(); + vo.setAddress(province + city + county + detail); vo.setTradeTime(vo.getTradeStartTime() + "-" + vo.getTradeEndTime()); if (vo.getUserId() != null) { vo.setUserName(userInfo.get(vo.getUserId())); @@ -140,6 +147,7 @@ public class StoreServiceImpl extends ExtendServiceImpl list = new ArrayList<>(); //todo Long userId = SecurityUtils.getWhichUserId(); + List stores = baseMapper.queryRangeStore(longitude, latitude, distance, userId); if (CollUtil.isNotEmpty(stores)) { int index = 0; diff --git a/admin/src/main/java/com/baiye/modules/distribute/vo/StoreVO.java b/admin/src/main/java/com/baiye/modules/distribute/vo/StoreVO.java index cb6e747..3f30827 100644 --- a/admin/src/main/java/com/baiye/modules/distribute/vo/StoreVO.java +++ b/admin/src/main/java/com/baiye/modules/distribute/vo/StoreVO.java @@ -34,6 +34,9 @@ public class StoreVO { @Schema(description = "区县") private String county; + @Schema(description = "详情") + private String detail; + @Schema(description = "营业开始时间") private String tradeStartTime; diff --git a/admin/src/main/resources/mapper/StoreMapper.xml b/admin/src/main/resources/mapper/StoreMapper.xml index 4e87c69..b468a43 100644 --- a/admin/src/main/resources/mapper/StoreMapper.xml +++ b/admin/src/main/resources/mapper/StoreMapper.xml @@ -53,7 +53,7 @@ PI() / 180) / 2), 2))) * 1000) AS distance FROM tb_store - where create_by = 1 + where create_by = #{userId} and deleted = 0 HAVING distance <= #{distance} ORDER BY distance ASC