From e8e2e233af733ca3ba625223e2fd2255165e6b70 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 02 四月 2020 16:49:22 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java |   48 +++++++++++++++++++++++++++++++-----------------
 1 files changed, 31 insertions(+), 17 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java
index 37b5f01..d8006e2 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java
@@ -1,6 +1,7 @@
 package com.yeshi.fanli.service.impl.user.vip;
 
 import java.math.BigDecimal;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.Date;
@@ -14,7 +15,7 @@
 
 import com.yeshi.fanli.dao.mybatis.user.vip.UserVIPPreInfoMapper;
 import com.yeshi.fanli.dto.msg.MsgAccountVipDTO;
-import com.yeshi.fanli.dto.msg.MsgOtherSystemGiveDTO;
+import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail.MsgTypeOtherTypeEnum;
 import com.yeshi.fanli.entity.bus.user.HongBaoV2;
 import com.yeshi.fanli.entity.bus.user.ThreeSale;
 import com.yeshi.fanli.entity.bus.user.UserInfo;
@@ -42,6 +43,9 @@
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.StringUtil;
 import com.yeshi.fanli.util.annotation.RequestSerializableByKeyService;
+import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
+import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
+import com.yeshi.fanli.vo.msg.CommonMsgItemVOFactory;
 
 @Service
 public class UserVIPPreInfoServiceImpl implements UserVIPPreInfoService {
@@ -219,6 +223,11 @@
 	 */
 	@Transactional(rollbackFor = Exception.class)
 	private boolean oneProcess(Long uid, long countZiGou, long countShare, long firstTeam, long secondTeam) {
+		UserVIPPreInfo oldInfo = userVIPPreInfoMapper.selectByUidAndProcess(uid, UserVIPPreInfo.PROCESS_1);
+		if (oldInfo != null) {
+			return true;
+		}
+					
 		boolean process = false;
 		String msg = "";
 		
@@ -291,11 +300,14 @@
 					userInfoExtraService.addGoldCoinByUid(uid, Integer.parseInt(goldcoin));
 					
 					// 娑堟伅
-					MsgOtherSystemGiveDTO dto = new MsgOtherSystemGiveDTO();
-					dto.setName("绯荤粺璧犻�� ");
-					dto.setReason("鎭枩浣狅紒鎴愬姛鍗囩骇涓烘櫘閫氫細鍛�");
-					dto.setDesc("鑾峰緱閲戝竵" + goldcoinNum+"鏋�");
-					userOtherMsgNotificationService.vipUpgradeReward(uid, "璇︽儏鏌ョ湅锛屽搴斾細鍛樻潈鐩�", dto);
+					List<CommonMsgItemVO> listMsg = new ArrayList<>();
+					listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鐘�        鎬�", ClientTextStyleVO.COLOR_TITLE),
+							new ClientTextStyleVO("鎭枩浣狅紒鎴愬姛鍗囩骇涓烘櫘閫氫細鍛�", ClientTextStyleVO.COLOR_CONTENT)));
+					listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("濂�        鍔�", ClientTextStyleVO.COLOR_TITLE),
+							new ClientTextStyleVO("鑾峰緱閲戝竵" + goldcoinNum+"鏋�", ClientTextStyleVO.COLOR_CONTENT)));
+					listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("澶�        娉�", ClientTextStyleVO.COLOR_TITLE),
+							new ClientTextStyleVO("璇︽儏鏌ョ湅锛屽搴斾細鍛樻潈鐩�", ClientTextStyleVO.COLOR_CONTENT)));
+					userOtherMsgNotificationService.createMsgOtherDetail(uid, listMsg, MsgTypeOtherTypeEnum.vipUpgradeReward);
 				}
 				
 				// 鏄惁瀛樺湪涓嬬骇鑴辩鏈熼檺 -鏇存柊涓嶈劚绂�
@@ -351,11 +363,11 @@
 		boolean process = false;
 		String msg = "";
 		
-		long limitZiGou = 0;
-		String zigou = userVipConfigService.getValueByKey("vip_pre_7_zigou_order_count");
-		if (!StringUtil.isNullOrEmpty(zigou)) {
-			limitZiGou = Long.parseLong(zigou);
-		}
+		long limitZiGou = 10;
+//		String zigou = userVipConfigService.getValueByKey("vip_pre_7_zigou_order_count");
+//		if (!StringUtil.isNullOrEmpty(zigou)) {
+//			limitZiGou = Long.parseLong(zigou);
+//		}
 		
 		long limitShare = 0;
 		String share = userVipConfigService.getValueByKey("vip_pre_7_share_order_count");
@@ -411,12 +423,14 @@
 								UserSystemCoupon.SOURCE_SYSTEM_PUSH, percent, false);
 					}
 					
-					// 娑堟伅
-					MsgOtherSystemGiveDTO dto = new MsgOtherSystemGiveDTO();
-					dto.setName("绯荤粺璧犻�� ");
-					dto.setReason("鎭枩浣狅紒鎴愬姛鍗囩骇涓洪珮绾т細鍛�");
-					dto.setDesc("鑾峰緱杩斿埄濂栧姳鍒�" + num +"寮�");
-					userOtherMsgNotificationService.vipUpgradeReward(uid, "璇︽儏鏌ョ湅锛屽搴斾細鍛樻潈鐩�", dto);
+					List<CommonMsgItemVO> listMsg = new ArrayList<>();
+					listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鐘�        鎬�", ClientTextStyleVO.COLOR_TITLE),
+							new ClientTextStyleVO("鎭枩浣狅紒鎴愬姛鍗囩骇涓洪珮绾т細鍛�", ClientTextStyleVO.COLOR_CONTENT)));
+					listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("濂�        鍔�", ClientTextStyleVO.COLOR_TITLE),
+							new ClientTextStyleVO("鑾峰緱杩斿埄濂栧姳鍒�" + num +"寮�", ClientTextStyleVO.COLOR_CONTENT)));
+					listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("澶�        娉�", ClientTextStyleVO.COLOR_TITLE),
+							new ClientTextStyleVO("璇︽儏鏌ョ湅锛屽搴斾細鍛樻潈鐩�", ClientTextStyleVO.COLOR_CONTENT)));
+					userOtherMsgNotificationService.createMsgOtherDetail(uid, listMsg, MsgTypeOtherTypeEnum.vipUpgradeReward);
 				}
 			} catch (Exception e) {
 				e.printStackTrace();

--
Gitblit v1.8.0