Commit 8c9207ad by weijiguang

恢复部分代码

parent d26ca9b0
...@@ -11,6 +11,7 @@ import com.soss.system.domain.vo.LocationVo; ...@@ -11,6 +11,7 @@ import com.soss.system.domain.vo.LocationVo;
import com.soss.system.mapper.ShopMapper; import com.soss.system.mapper.ShopMapper;
import com.soss.system.utils.AreaUtil; import com.soss.system.utils.AreaUtil;
import com.soss.system.utils.DistanceUtil; import com.soss.system.utils.DistanceUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.BooleanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -22,6 +23,7 @@ import java.util.Comparator; ...@@ -22,6 +23,7 @@ import java.util.Comparator;
import java.util.List; import java.util.List;
@Service @Service
@Slf4j
public class AppServiceImpl { public class AppServiceImpl {
@Autowired @Autowired
private ShopMapper shopMapper; private ShopMapper shopMapper;
...@@ -35,6 +37,7 @@ public class AppServiceImpl { ...@@ -35,6 +37,7 @@ public class AppServiceImpl {
public Shop getShop(LoginUser loginUser, String lng, String lat, Boolean testFlag) throws ParseException { public Shop getShop(LoginUser loginUser, String lng, String lat, Boolean testFlag) throws ParseException {
Shop shop = null; Shop shop = null;
if (StringUtils.isEmpty(lng) || StringUtils.isEmpty(lat)) { if (StringUtils.isEmpty(lng) || StringUtils.isEmpty(lat)) {
log.info("getShop lng&lat is null");
// 未授权位置 // 未授权位置
if (loginUser == null) { if (loginUser == null) {
// 未登录,返回默认店铺 // 未登录,返回默认店铺
...@@ -53,6 +56,7 @@ public class AppServiceImpl { ...@@ -53,6 +56,7 @@ public class AppServiceImpl {
} }
} else { } else {
// 授权了位置 // 授权了位置
log.info("getShop lng={}, lat={}", lng, lat);
List<Integer> states = null; List<Integer> states = null;
if (BooleanUtils.isTrue(testFlag)) { if (BooleanUtils.isTrue(testFlag)) {
states = Arrays.asList(ShopState.TESTING.getState(), ShopState.OPEN.getState()); states = Arrays.asList(ShopState.TESTING.getState(), ShopState.OPEN.getState());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment