package shop.alien.storeplatform.service.impl;

import lombok.RequiredArgsConstructor;
import org.springframework.data.geo.Point;
import org.springframework.stereotype.Service;
import shop.alien.config.redis.BaseRedisService;
import shop.alien.storeplatform.service.NearMeService;
import shop.alien.util.common.constant.Constant;

@Service
@RequiredArgsConstructor
public class NearMeServiceImpl implements NearMeService {

    private final BaseRedisService baseRedisService;

    /**
     * 添加地址位置
     *
     * @param point
     * @param content
     */
    @Override
    public void inGeolocation(Point point, String content, Boolean flag) {
        baseRedisService.inGeolocation(point, content, flag ? Constant.GEO_STORE_PRIMARY : Constant.GEO_STORE_NAME);
    }

}
