Commit 8c9207ad by weijiguang

恢复部分代码

parent d26ca9b0
......@@ -11,6 +11,7 @@ import com.soss.system.domain.vo.LocationVo;
import com.soss.system.mapper.ShopMapper;
import com.soss.system.utils.AreaUtil;
import com.soss.system.utils.DistanceUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.BooleanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -22,6 +23,7 @@ import java.util.Comparator;
import java.util.List;
@Service
@Slf4j
public class AppServiceImpl {
@Autowired
private ShopMapper shopMapper;
......@@ -35,6 +37,7 @@ public class AppServiceImpl {
public Shop getShop(LoginUser loginUser, String lng, String lat, Boolean testFlag) throws ParseException {
Shop shop = null;
if (StringUtils.isEmpty(lng) || StringUtils.isEmpty(lat)) {
log.info("getShop lng&lat is null");
// 未授权位置
if (loginUser == null) {
// 未登录,返回默认店铺
......@@ -53,6 +56,7 @@ public class AppServiceImpl {
}
} else {
// 授权了位置
log.info("getShop lng={}, lat={}", lng, lat);
List<Integer> states = null;
if (BooleanUtils.isTrue(testFlag)) {
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