From 0ec22dcf4fd9c4496e6f681e7fab89f56c6e4e8a Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期四, 02 四月 2020 14:45:20 +0800
Subject: [PATCH] vip 消息

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java |   46 +++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 39 insertions(+), 7 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 b5be310..9d77afd 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
@@ -101,15 +101,16 @@
 
 	@Resource
 	private UserInfoService userInfoService;
-
+	
+	
 	@Resource
-	private UserLevelUpgradedNotifyService userLevelUpgradedNotifyService;
-
+	private UserVIPInfoService userVIPInfoService;
+	
 	@Resource
 	private UserVIPPreInfoService userVIPPreInfoService;
 
 	@Resource
-	private UserVIPInfoService userVIPInfoService;
+	private UserLevelUpgradedNotifyService userLevelUpgradedNotifyService;
 
 	@Resource
 	private ThreeSaleSerivce threeSaleSerivce;
@@ -365,6 +366,37 @@
 					data.put("tearcherLink", tearcherLink);
 				}
 			}
+
+			
+			if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
+				// TODO 楠岃瘉鏄惁鏄甯�
+				
+				JSONObject inner = new JSONObject();
+				inner.put("link", "https://www.baidu.com/");
+				inner.put("ion", "http://img.flqapp.com/resource/vip/icon_vip.png");
+				inner.put("title", "鍏嶈垂鍗囩骇 浜細鍛樻潈鐩�");
+				inner.put("btnName", "鍗囩骇浼氬憳");
+				if (uid != null) {
+					// 鏄惁瀵煎笀 TODO
+					
+					if (userVIPInfoService.isVIP(uid)) {
+						inner.put("link", "https://www.baidu.com/");
+						inner.put("ion", "http://img.flqapp.com/resource/vip/icon_tearcher.png");
+						inner.put("title", "鎷夸簲闄╀笌娲ヨ创 浜甯堟潈鐩�");
+						inner.put("btnName", "鍗囩骇浼氬憳");
+					} else {
+						UserVIPPreInfo userVIPPreInfo = userVIPPreInfoService.getLatestProcessInfo(uid);
+						if (userVIPPreInfo != null) {
+							if (userVIPPreInfo.getProcess() == UserVIPPreInfo.PROCESS_1) {
+								inner.put("btnName", "鍗囩骇楂樼骇浼氬憳");
+							} else if (userVIPPreInfo.getProcess() == UserVIPPreInfo.PROCESS_2) {
+								inner.put("btnName", "鍗囩骇瓒呯骇浼氬憳");
+							}
+						}
+					}
+				}
+				data.put("vip", inner);
+			}
 
 			if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion()) && uid != null) {
 				UserLevelUpgradedNotify notify = userLevelUpgradedNotifyService.getNeedNotifyByUid(uid);
@@ -383,16 +415,16 @@
 						data.put("vipUpgradedNotify", notifyVO);
 					}
 				}
-
 			}
-
 			out.print(JsonUtil.loadTrueResult(data));
 		} catch (Exception e) {
 			out.print(JsonUtil.loadFalseResult("鑾峰彇澶辫触"));
 			e.printStackTrace();
 		}
-
 	}
+	
+	
+	
 
 	// 鑾峰彇鍗囩骇鏃堕棿
 	private Date getUpgradedTime(Long uid, UserLevelEnum level) {

--
Gitblit v1.8.0