瀏覽代碼

fix 无锡ip隐藏实物

zoujiajian 2 年之前
父節點
當前提交
ccc950e374
共有 1 個文件被更改,包括 9 次插入9 次删除
  1. 9 9
      netflix-web/src/main/java/com/cyksj/web/controller/goods/GoodsDonController.java

+ 9 - 9
netflix-web/src/main/java/com/cyksj/web/controller/goods/GoodsDonController.java

@@ -551,10 +551,10 @@ public class GoodsDonController {
 //		List<Long> filter_goodsIds = getFilterGoodsIds();
 		List<Long> filter_goodsIds = null;
 		AtomicBoolean isRemoveRg = new AtomicBoolean(false);
-//		if (isHzIp()) {
-//			key += ":hz-ip";
-//			isRemoveRg.set(true);
-//		}
+		if (isHzIp()) {
+			key += ":hz-ip";
+			isRemoveRg.set(true);
+		}
 		Long fUid = StpUserUtil.getUserIdAfterLogin();
 		Object o = redisService.get(key);
 		if (o == null) {
@@ -633,7 +633,7 @@ public class GoodsDonController {
     }
 
 	public Boolean isHzIp() {
-		if (StringUtil.getRealAddressByIP(ServletUtil.getClientIP(request)).contains("杭州")) {
+		if (StringUtil.getRealAddressByIP(ServletUtil.getClientIP(request)).contains("无锡")) {
 			return true;
 		}
 		return false;
@@ -1107,10 +1107,10 @@ public class GoodsDonController {
 		String key = RedisService.key.YH_HOME_PAGHE_CACHE.getEnvName() + "pc:homeManage";
 		//移除奈飞客厅 临时
 		Long filterConfigId = null;
-//		if (isHzIp()) {
-//			key += ":hz_ip";
-//			filterConfigId = 55l;
-//		}
+		if (isHzIp()) {
+			key += ":hz_ip";
+			filterConfigId = 55l;
+		}
 		Object o = redisService.get(key);
 		if (o == null) {
 			MapBuilder builder = MapUtils.builder()