From e2c9fab4823b9a9a8a186951faa5a54d1f57fb1f Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 17 十月 2019 14:58:29 +0800
Subject: [PATCH] 订单爬取优化 增加日志类型

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java |   67 ++++++++++++++++++++++++++++-----
 1 files changed, 56 insertions(+), 11 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java
index 5a2d633..368e08d 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java
@@ -13,6 +13,7 @@
 import com.yeshi.fanli.entity.accept.AcceptData;
 import com.yeshi.fanli.entity.bus.homemodule.FloatAD;
 import com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState;
+import com.yeshi.fanli.entity.bus.user.UserActiveLog;
 import com.yeshi.fanli.entity.config.AppHomeFloatImg;
 import com.yeshi.fanli.entity.taobao.ClientTBPid;
 import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
@@ -20,7 +21,9 @@
 import com.yeshi.fanli.service.inter.homemodule.FloatADService;
 import com.yeshi.fanli.service.inter.msg.MsgDeviceReadStateService;
 import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService;
+import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinOriginService;
 import com.yeshi.fanli.service.inter.user.TBPidService;
+import com.yeshi.fanli.service.inter.user.UserActiveLogService;
 import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.StringUtil;
@@ -59,14 +62,23 @@
 	@Resource
 	private MsgDeviceReadStateService msgDeviceReadStateService;
 
+	@Resource
+	private UserTaoLiJinOriginService uerTaoLiJinOriginService;
+
+	@Resource
+	private UserActiveLogService userActiveLogService;
+
 	/**
-	 * 棣栭〉閰嶇疆淇℃伅
+	 * s 棣栭〉閰嶇疆淇℃伅
 	 * 
 	 * @param acceptData
 	 * @param out
 	 */
 	@RequestMapping(value = "getHomeConfig", method = RequestMethod.POST)
 	public void getHomeConfig(AcceptData acceptData, Long uid, PrintWriter out) {
+		if (uid != null && uid == 0L)
+			uid = null;
+
 		AppHomeFloatImg appHomeFloatImg = configService.getAppHomeFloatImg();
 		if ("ios".equalsIgnoreCase(acceptData.getPlatform()) && !Constant.IS_TEST) {
 			appHomeFloatImg = null;
@@ -82,8 +94,10 @@
 			data.put("floatNotifyImg", notifyImg);
 		}
 
-		// 鎮诞澶у浘 1.5.2 -2019.3.20
-		FloatAD floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX);
+
+		// 鏃犳柊浜哄脊妗� 鍒欐煡璇㈤粯璁�
+		FloatAD floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX, 0);
+
 		if (floatAD != null) {
 			JSONObject detail = new JSONObject();
 			detail.put("img", floatAD.getPicture());
@@ -91,13 +105,7 @@
 			detail.put("params", floatAD.getParams());
 			detail.put("showTime", floatAD.getShowMode());
 			detail.put("accountLogin", floatAD.isJumpNeedLogin());
-
-			if (uid != null && userInfoExtraService.isNewUser(uid)) {
-				// 鏂扮敤鎴�
-				data.put("floatImgDetail", detail);
-			} else {
-				data.put("floatImgDetail", detail);
-			}
+			data.put("floatImgDetail", detail);
 		}
 
 		// 棰嗗埜甯姪閾炬帴,1.5.2鍚庣敓鏁�
@@ -110,7 +118,31 @@
 			data.put("htmlLink", configService.get("index_html_link_android"));
 		}
 
+		// 鍒ゆ柇鏂拌�佺敤鎴�
+		UserActiveLog da = null;
+		if (uid != null)
+			da = userActiveLogService.getFirstActiveInfo(uid);
+		// 鏂颁汉
+		if (da == null || (System.currentTimeMillis() - da.getCreateTime().getTime()) <= 1000 * 60 * 60 * 24 * 15L) {
+			data.put("userTimeType", 0);
+		} else {// 鑰佷汉
+			data.put("userTimeType", 1);
+		}
+		data.put("hotFuctionLink",
+				configService.getByVersion("hot_function_url", platform, Integer.parseInt(acceptData.getVersion())));//
 		out.print(JsonUtil.loadTrueResult(data));
+	}
+
+	/**
+	 * 娑堟伅涓績寮规
+	 * 
+	 * @param acceptData
+	 * @param uid
+	 * @param out
+	 */
+	@RequestMapping(value = "getMSGConfig", method = RequestMethod.POST)
+	public void getMSGConfig(AcceptData acceptData, Long uid, PrintWriter out) {
+		out.print(JsonUtil.loadFalseResult("鎺ㄥ箍绾㈠寘鐩稿叧鍔熻兘宸蹭笅绾匡紒"));
 	}
 
 	@RequestMapping(value = "getTaoBaoCartConfig", method = RequestMethod.POST)
@@ -207,7 +239,8 @@
 			data.put("serviceProtocolLink", serviceProtocol);
 			data.put("privacyProtocolLink", privacyProtocol);
 			// 璐墿杞﹁烦杞柟寮�(鍖呭惈jumpDetail涓巔arams)
-			JSONObject source = JSONObject.fromObject(configService.get("taobao_cart_jump_detail"));
+			JSONObject source = JSONObject.fromObject(configService.getByVersion("taobao_cart_jump_detail",
+					acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion())));
 			data.put("taoBaoCart", source);
 			out.print(JsonUtil.loadTrueResult(data));
 		} catch (Exception e) {
@@ -273,7 +306,19 @@
 						"android".equalsIgnoreCase(acceptData.getPlatform()) ? 1 : 2);
 			}
 		});
+	}
 
+	/**
+	 * 鑾峰彇閭�璇风爜甯姪閾炬帴
+	 * 
+	 * @param acceptData
+	 * @param out
+	 */
+	@RequestMapping(value = "getInviteCodeInputHelp", method = RequestMethod.POST)
+	public void getInviteCodeInputHelp(AcceptData acceptData, PrintWriter out) {
+		JSONObject data = new JSONObject();
+		data.put("helpUrl", configService.get("invite_code_input_help"));
+		out.print(JsonUtil.loadTrueResult(data));
 	}
 
 }

--
Gitblit v1.8.0