From 0922bfdb56bc30125d6fc8e13c50cdda7cd9dc72 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 09 九月 2019 18:59:52 +0800
Subject: [PATCH] 提现自动绑定修改

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java
index 35ac513..8bd65cc 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java
@@ -2,6 +2,7 @@
 
 import java.io.InputStream;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 import java.util.UUID;
@@ -22,11 +23,11 @@
 import com.yeshi.fanli.entity.common.JumpDetailV2;
 import com.yeshi.fanli.exception.homemodule.SpecialException;
 import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
+import com.yeshi.fanli.service.inter.config.AppVersionService;
 import com.yeshi.fanli.service.inter.config.ConfigService;
 import com.yeshi.fanli.service.inter.homemodule.SpecialCardService;
 import com.yeshi.fanli.service.inter.homemodule.SpecialPlaceService;
 import com.yeshi.fanli.service.inter.homemodule.SpecialService;
-import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.StringUtil;
 import com.yeshi.fanli.util.VersionUtil;
 
@@ -49,6 +50,9 @@
 
 	@Resource
 	private ConfigService configService;
+
+	@Resource
+	private AppVersionService appVersionService;
 
 	@Override
 	public Special selectByPrimaryKey(Long id) {
@@ -365,6 +369,12 @@
 	}
 
 	@Override
+	@Cacheable(value = "specialCache", key = "'listByVersion-'+#start+'-'+#count+'-'+#card+'-'+#platform+'-'+#versionCode")
+	public List<Special> listByVersion(long start, int count, String card, Integer platform, Integer versionCode) {
+		return specialMapper.listByVersion(start, count, card, platform, versionCode);
+	}
+
+	@Override
 	@Cacheable(value = "specialCache", key = "'listCacheSpecialToIndex'+#acceptData.platform+'-'+#acceptData.version+'-'+#sex")
 	public JSONObject listCacheSpecialToIndex(AcceptData acceptData, Integer sex) throws Exception {
 
@@ -372,7 +382,9 @@
 		JSONObject arcMap = new JSONObject();
 
 		String indexArc = "index_arc";
-		if (VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion()))
+		if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion()))
+			indexArc = "index_arc_1.6.5";
+		else if (VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion()))
 			indexArc = "index_arc_1.6.0";
 		else if (VersionUtil.greaterThan_1_5_70(acceptData.getPlatform(), acceptData.getVersion()))
 			indexArc = "index_arc_1.5.7";
@@ -390,9 +402,10 @@
 			}
 		}
 
+		int hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY);
+
 		// 澶勭悊9.9鍖呴偖
-		if (listArc != null && VersionUtil.greaterThan_1_5_50(acceptData.getPlatform(), acceptData.getVersion())
-				&& !Constant.IS_TEST)
+		if (listArc != null && VersionUtil.greaterThan_1_5_50(acceptData.getPlatform(), acceptData.getVersion()))
 			for (Special s : listArc) {
 				if (s.getName().contains("9.9")) {// 9鍧�9
 					s.setJumpDetail(jumpDetailV2Service.getByTypeCache("common_template"));
@@ -400,6 +413,18 @@
 					params.put("key", CommonContentTypeEnum._9k9.name());
 					params.put("title", CommonContentTypeEnum._9k9.getDesc());
 					s.setParams(params.toString());
+				} else if (s.getName().contains("鑷喘绔嬪噺")) {
+					if (hour < 6) {// 0-6鐐逛箣闂翠笉杩涘叆鑷喘绔嬪噺鐨勯〉闈�
+						s.setJumpDetail(jumpDetailV2Service.getByTypeCache("web"));
+						JSONObject params = new JSONObject();
+						params.put("url", configService.get("tlj_own_buy_nogoods"));
+						s.setParams(params.toString());
+					} else {
+						// 鏌ヨ涓撻璇︽儏
+						Special special = specialMapper.selectByPrimaryKey(s.getId());
+						s.setJumpDetail(special.getJumpDetail());
+						s.setParams(special.getParams());
+					}
 				}
 			}
 

--
Gitblit v1.8.0