From fdb089cb8bee6099efcbd7b0ca2672c63cbb6784 Mon Sep 17 00:00:00 2001
From: yujian <yujian@123.com>
Date: 星期一, 11 十一月 2019 09:33:56 +0800
Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java |   51 ++++++++++++++++++++++++++++++++-------------------
 1 files changed, 32 insertions(+), 19 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java
index 84c167f..eb734af 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/ConfigControllerV2.java
@@ -79,8 +79,7 @@
 
 	@Resource
 	private RedPackWinNewUserService redPackWinNewUserService;
-	
-	
+
 	/**
 	 * s 棣栭〉閰嶇疆淇℃伅
 	 * 
@@ -145,7 +144,6 @@
 		out.print(JsonUtil.loadTrueResult(data));
 	}
 
-	
 	/**
 	 * s 棣栭〉閰嶇疆淇℃伅
 	 * 
@@ -156,7 +154,7 @@
 	public void getHomeConfigNew(AcceptData acceptData, Long uid, PrintWriter out) {
 		if (uid != null && uid == 0L)
 			uid = null;
-		
+
 		// 娲诲姩寮规
 		List<FloatAD> listAD = null;
 		if (redPackWinNewUserService.verifyHasReward(uid)) {
@@ -164,17 +162,17 @@
 		} else {
 			listAD = floatADService.getValidCommonByPosition(FloatAD.POSITION_INDEX);
 		}
-		
+
 		List<FloatImgDetailVO> listVO = new ArrayList<FloatImgDetailVO>();
 		if (listAD != null && !listAD.isEmpty()) {
-			for (FloatAD floatAD: listAD) {
+			for (FloatAD floatAD : listAD) {
 				JumpDetailV2 jumpDetail = floatAD.getJumpDetail();
 				if (jumpDetail != null) {
 					jumpDetail = jumpDetailV2Service.selectByPrimaryKey(jumpDetail.getId());
 					if (jumpDetail != null) {
 						jumpDetail.setNeedLogin(floatAD.isJumpNeedLogin());
 					}
-				} 
+				}
 				FloatImgDetailVO floatImgVO = new FloatImgDetailVO();
 				floatImgVO.setId(floatAD.getId().toString());
 				floatImgVO.setImg(floatAD.getPicture());
@@ -182,16 +180,31 @@
 				floatImgVO.setJumpDetail(jumpDetail);
 				floatImgVO.setShowTime(floatAD.getShowMode());
 				floatImgVO.setAccountLogin(floatAD.isJumpNeedLogin());
+				if (floatAD.getPlaySound() != null)
+					floatImgVO.setPlaySound(floatAD.getPlaySound());// 榛樿閮芥挱鏀鹃煶鏁�
+				else
+					floatImgVO.setPlaySound(false);
 				listVO.add(floatImgVO);
 			}
 		}
-		
+
 		JSONObject data = new JSONObject();
 		data.put("listAD", JsonUtil.getApiCommonGson().toJson(listVO));
-		
+
 		// 棰嗗埜甯姪閾炬帴,1.5.2鍚庣敓鏁�
 		String couponHelp = configService.get("taobao_coupon_help");
 		data.put("couponHelpUrl", couponHelp);
+
+		// 鍒ゆ柇鏂拌�佺敤鎴� 鏄剧ず鐑棬鍔熻兘鎸夐挳婊戝姩
+		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);
+		}
 
 		// 鏄惁鏄剧ず鐑棬鍔熻兘鎸夐挳
 		String platform = acceptData.getPlatform();
@@ -199,8 +212,7 @@
 				configService.getByVersion("hot_function_url", platform, Integer.parseInt(acceptData.getVersion())));
 		out.print(JsonUtil.loadTrueResult(data));
 	}
-	
-	
+
 	/**
 	 * 娑堟伅涓績寮规
 	 * 
@@ -303,14 +315,15 @@
 			data.put("baichuan", false);// 涓嶉渶瑕侀噰鐢ㄩ樋閲岀櫨宸濈殑鏂瑰紡鍔犺浇webview
 			data.put("goodsDetail", false);// 涓嶉渶瑕佹嫤鎴晢鍝佽鎯�
 		}
-//TODO 鍓嶇闇�瑕佸鐞�		
-//		if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) {
-//			JSONObject js = new JSONObject();
-//			String jsStr = configService.get("url_extract_id");
-//			String md5 = StringUtil.Md5(jsStr);
-//			js.put("md5", md5);
-//			data.put("js", js);
-//		}
+		// TODO 鍓嶇闇�瑕佸鐞�
+		// if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(),
+		// acceptData.getVersion())) {
+		// JSONObject js = new JSONObject();
+		// String jsStr = configService.get("url_extract_id");
+		// String md5 = StringUtil.Md5(jsStr);
+		// js.put("md5", md5);
+		// data.put("js", js);
+		// }
 
 		out.print(JsonUtil.loadTrueResult(data));
 	}

--
Gitblit v1.8.0