From 5e7b0ed4a154ad067cbcf4aa1a1c7cce32f9864c Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期五, 26 四月 2024 18:02:17 +0800
Subject: [PATCH] 唯品会链接解析升级

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java |  528 +++++++++++++++++++++++++++++-----------------------------
 1 files changed, 267 insertions(+), 261 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 b86e005..1793fd2 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
@@ -7,6 +7,7 @@
 
 import javax.annotation.Resource;
 
+import com.yeshi.fanli.exception.user.vip.UserVIPUpgradeException;
 import org.springframework.core.task.TaskExecutor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -49,316 +50,321 @@
 @Service
 public class UserVIPPreInfoServiceImpl implements UserVIPPreInfoService {
 
-	@Resource
-	private UserVIPPreInfoMapper userVIPPreInfoMapper;
+    @Resource
+    private UserVIPPreInfoMapper userVIPPreInfoMapper;
 
-	@Resource
-	private HongBaoV2CountService hongBaoV2CountService;
+    @Resource
+    private HongBaoV2CountService hongBaoV2CountService;
 
-	@Resource
-	private ThreeSaleSerivce threeSaleSerivce;
+    @Resource
+    private ThreeSaleSerivce threeSaleSerivce;
 
-	@Resource
-	private UserVipConfigService userVipConfigService;
+    @Resource
+    private UserVipConfigService userVipConfigService;
 
-	@Resource
-	private UserInviteValidNumService userInviteValidNumService;
+    @Resource
+    private UserInviteValidNumService userInviteValidNumService;
 
-	@Resource
-	private UserInfoExtraService userInfoExtraService;
+    @Resource
+    private UserInfoExtraService userInfoExtraService;
 
-	@Resource
-	private UserInfoService userInfoService;
+    @Resource
+    private UserInfoService userInfoService;
 
-	@Resource
-	private UserOtherMsgNotificationService userOtherMsgNotificationService;
+    @Resource
+    private UserOtherMsgNotificationService userOtherMsgNotificationService;
 
-	@Resource
-	private UserAccountMsgNotificationService userAccountMsgNotificationService;
+    @Resource
+    private UserAccountMsgNotificationService userAccountMsgNotificationService;
 
-	@Resource
-	private UserInfoRegisterService userInfoRegisterService;
+    @Resource
+    private UserInfoRegisterService userInfoRegisterService;
 
-	@Resource
-	private UserInviteMsgNotificationService userInviteMsgNotificationService;
+    @Resource
+    private UserInviteMsgNotificationService userInviteMsgNotificationService;
 
-	@Resource
-	private UserLevelUpgradedNotifyService userLevelUpgradedNotifyService;
+    @Resource
+    private UserLevelUpgradedNotifyService userLevelUpgradedNotifyService;
 
-	@Resource(name = "taskExecutor")
-	private TaskExecutor executor;
+    @Resource(name = "taskExecutor")
+    private TaskExecutor executor;
 
-	@Resource
-	private RocketMQManager rocketMQManager;
+    @Resource
+    private RocketMQManager rocketMQManager;
 
-	@Resource
-	private TeamUserLevelStatisticService teamUserLevelStatisticService;
+    @Resource
+    private TeamUserLevelStatisticService teamUserLevelStatisticService;
 
-	@Transactional
-	@Override
-	public void addUserVIPPreInfo(UserVIPPreInfo info) throws UserVIPPreInfoException {
-		if (info == null || info.getUid() == null || info.getProcess() == null || info.getSourceType() == null)
-			throw new UserVIPPreInfoException(1, "淇℃伅涓嶅畬鏁�");
-		for (Long fuid : Constant.NO_UPGRADE_UIDS) {// 绂佹涓嶈兘鍗囩骇鐨勭敤鎴峰崌绾�
-			if (info.getUid().longValue() == fuid)
-				throw new UserVIPPreInfoException(100, "绂佹鍗囩骇");
-		}
+    @Transactional
+    @Override
+    public void addUserVIPPreInfo(UserVIPPreInfo info) throws UserVIPPreInfoException {
+        if (info == null || info.getUid() == null || info.getProcess() == null || info.getSourceType() == null)
+            throw new UserVIPPreInfoException(1, "淇℃伅涓嶅畬鏁�");
+        for (Long fuid : Constant.NO_UPGRADE_UIDS) {// 绂佹涓嶈兘鍗囩骇鐨勭敤鎴峰崌绾�
+            if (info.getUid().longValue() == fuid)
+                throw new UserVIPPreInfoException(100, "绂佹鍗囩骇");
+        }
 
-		UserVIPPreInfo oldInfo = userVIPPreInfoMapper.selectByUidAndProcess(info.getUid(), info.getProcess());
-		if (oldInfo != null)
-			throw new UserVIPPreInfoException(2, "杩涘害宸插瓨鍦�");
-		if (info.getCreateTime() == null)
-			info.setCreateTime(new Date());
+        UserVIPPreInfo oldInfo = userVIPPreInfoMapper.selectByUidAndProcess(info.getUid(), info.getProcess());
+        if (oldInfo != null)
+            throw new UserVIPPreInfoException(2, "杩涘害宸插瓨鍦�");
+        if (info.getCreateTime() == null)
+            info.setCreateTime(new Date());
 
-		UserVIPPreInfo old = getLatestProcessInfo(info.getUid());
+        UserVIPPreInfo old = getLatestProcessInfo(info.getUid());
 
-		userVIPPreInfoMapper.insertSelective(info);
-		// 璁剧疆缁熻鏁版嵁
-		teamUserLevelStatisticService.setUserLevel(info.getUid(), UserLevelUtil.getByLevel(info.getProcess()));
+        userVIPPreInfoMapper.insertSelective(info);
+        // 璁剧疆缁熻鏁版嵁
+        teamUserLevelStatisticService.setUserLevel(info.getUid(), UserLevelUtil.getByLevel(info.getProcess()));
 
-		// 鍙戦�佺瓑绾у彉鍖栨秷鎭�
-		if (!Constant.IS_TEST) {
-			UserLevelEnum oldLevel = null;
-			if (old == null)
-				oldLevel = UserLevelEnum.daRen;
-			else {
-				oldLevel = UserLevelUtil.getByLevel(old.getProcess());
-			}
+        // 鍙戦�佺瓑绾у彉鍖栨秷鎭�
+        if (!Constant.IS_TEST) {
+            UserLevelEnum oldLevel = null;
+            if (old == null)
+                oldLevel = UserLevelEnum.daRen;
+            else {
+                oldLevel = UserLevelUtil.getByLevel(old.getProcess());
+            }
 
-			if (oldLevel == UserLevelEnum.normalVIP)
-				oldLevel = UserLevelEnum.daRen;
+            if (oldLevel == UserLevelEnum.normalVIP)
+                oldLevel = UserLevelEnum.daRen;
 
-			UserLevelChangedMQMsg msg = new UserLevelChangedMQMsg(info.getUid(), oldLevel,
-					UserLevelUtil.getByLevel(info.getProcess()), new Date());
-			Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.userLevelChanged, msg);
-			//寤舵椂10s鍙戦��
-			rocketMQManager.sendNormalMsg(message,1000*10L, null);
-		}
+            UserLevelChangedMQMsg msg = new UserLevelChangedMQMsg(info.getUid(), oldLevel,
+                    UserLevelUtil.getByLevel(info.getProcess()), new Date());
+            Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.userLevelChanged, msg);
+            //寤舵椂10s鍙戦��
+            rocketMQManager.sendNormalMsg(message, 1000 * 10L, null);
+        }
 
-	}
+    }
 
-	@Override
-	public UserVIPPreInfo getLatestProcessInfo(Long uid) {
-		List<UserVIPPreInfo> infoList = userVIPPreInfoMapper.listByUid(uid);
-		if (infoList == null || infoList.size() == 0)
-			return null;
+    @Override
+    public UserVIPPreInfo getLatestProcessInfo(Long uid) {
+        List<UserVIPPreInfo> infoList = userVIPPreInfoMapper.listByUid(uid);
+        if (infoList == null || infoList.size() == 0)
+            return null;
 
-		Comparator<UserVIPPreInfo> cm = new Comparator<UserVIPPreInfo>() {
-			@Override
-			public int compare(UserVIPPreInfo o1, UserVIPPreInfo o2) {
-				return o2.getProcess() - o1.getProcess();
-			}
-		};
+        Comparator<UserVIPPreInfo> cm = new Comparator<UserVIPPreInfo>() {
+            @Override
+            public int compare(UserVIPPreInfo o1, UserVIPPreInfo o2) {
+                return o2.getProcess() - o1.getProcess();
+            }
+        };
 
-		Collections.sort(infoList, cm);
-		return infoList.get(0);
-	}
+        Collections.sort(infoList, cm);
+        return infoList.get(0);
+    }
 
-	@Override
-	public UserVIPPreInfo getVipByProcess(Long uid, int process) {
-		return userVIPPreInfoMapper.selectByUidAndProcess(uid, process);
-	}
+    @Override
+    public UserVIPPreInfo getVipByProcess(Long uid, int process) {
+        return userVIPPreInfoMapper.selectByUidAndProcess(uid, process);
+    }
 
-	@Override
-	public UserVIPPreInfo getProcessInfo(Long uid, Date time) {
-		List<UserVIPPreInfo> infoList = userVIPPreInfoMapper.listByUid(uid);
-		if (infoList == null || infoList.size() == 0)
-			return null;
-		Comparator<UserVIPPreInfo> cm = new Comparator<UserVIPPreInfo>() {
-			@Override
-			public int compare(UserVIPPreInfo o1, UserVIPPreInfo o2) {
-				return o2.getProcess() - o1.getProcess();
-			}
-		};
-		Collections.sort(infoList, cm);
+    @Override
+    public UserVIPPreInfo getProcessInfo(Long uid, Date time) {
+        List<UserVIPPreInfo> infoList = userVIPPreInfoMapper.listByUid(uid);
+        if (infoList == null || infoList.size() == 0)
+            return null;
+        Comparator<UserVIPPreInfo> cm = new Comparator<UserVIPPreInfo>() {
+            @Override
+            public int compare(UserVIPPreInfo o1, UserVIPPreInfo o2) {
+                return o2.getProcess() - o1.getProcess();
+            }
+        };
+        Collections.sort(infoList, cm);
 
-		for (UserVIPPreInfo info : infoList) {
-			if (time.getTime() >= info.getCreateTime().getTime())
-				return info;
-		}
-		return null;
-	}
+        for (UserVIPPreInfo info : infoList) {
+            if (time.getTime() >= info.getCreateTime().getTime())
+                return info;
+        }
+        return null;
+    }
 
-	@Override
-	@RequestSerializableByKeyService(key = "#uid")
-	@Transactional(rollbackFor = Exception.class)
-	public void upgradeVipByMyOrder(Long uid) {
-		UserVIPPreInfo latest = getLatestProcessInfo(uid);
-		if (latest != null && latest.getProcess() == UserVIPPreInfo.PROCESS_2) {
-			return;
-		}
+    @Override
+    @RequestSerializableByKeyService(key = "#uid")
+    @Transactional(rollbackFor = Exception.class)
+    public void upgradeVipByMyOrder(Long uid) throws UserVIPUpgradeException {
+        UserVIPPreInfo latest = getLatestProcessInfo(uid);
+        if (latest != null && latest.getProcess() == UserVIPPreInfo.PROCESS_2) {
+            return;
+        }
 
-		if (latest == null) {
-			String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
-			if (StringUtil.isNullOrEmpty(inviteCode)) {
-				return; // 鏈縺娲婚個璇风爜
-			}
-		}
+        if (latest == null) {
+            String inviteCode = userInfoExtraService.getInviteCodeByUid(uid);
+            if (StringUtil.isNullOrEmpty(inviteCode)) {
+                throw new UserVIPUpgradeException(10, "閭�璇风爜鏈縺娲�");
+            }
+        }
 
-		// 鑷喘+ 鍒嗕韩璁㈠崟鍒拌处
-		long doneZiGou = hongBaoV2CountService.countMyDirectOrderByCashArrival(uid, Constant.VIP_ORDER_PAY);
-		// 楂樼骇浼氬憳闄愬埗鏉′欢
-		long limitZiGou7 = 0;
-		String zigou7 = userVipConfigService.getValueByKey("vip_pre_7_order_count");
-		if (!StringUtil.isNullOrEmpty(zigou7)) {
-			limitZiGou7 = Long.parseLong(zigou7);
-		}
-		// 楠岃瘉鏄惁婊¤冻鍗囩骇楂樼骇浼氬憳
-		if (doneZiGou >= limitZiGou7) {
-			try {
-				twoProcess(uid, limitZiGou7, null, false);
-			} catch (UserVIPPreInfoException e) {
+        // 鑷喘+ 鍒嗕韩璁㈠崟鍒拌处
+        long doneZiGou = hongBaoV2CountService.countMyDirectOrderByCashArrival(uid, Constant.VIP_ORDER_PAY);
+        // 楂樼骇浼氬憳闄愬埗鏉′欢
+        long limitZiGou7 = 0;
+        String zigou7 = userVipConfigService.getValueByKey("vip_pre_7_order_count");
+        if (!StringUtil.isNullOrEmpty(zigou7)) {
+            limitZiGou7 = Long.parseLong(zigou7);
+        }
+        // 楠岃瘉鏄惁婊¤冻鍗囩骇楂樼骇浼氬憳
+        if (doneZiGou >= limitZiGou7) {
+            try {
+                twoProcess(uid, limitZiGou7, null, false);
+            } catch (UserVIPPreInfoException e) {
+                throw new UserVIPUpgradeException(1, "鍗囩骇鍑洪敊锛�" + e.getMessage());
+            }
+        } else {
+            throw new UserVIPUpgradeException(2, String.format("鏈揪鍒板崌绾ф潯浠讹細鑷喘+鍒嗕韩璁㈠崟-%s/%s", doneZiGou, limitZiGou7));
+        }
+    }
 
-			}
-		}
-	}
+    @Override
+    @RequestSerializableByKeyService(key = "#uid")
+    @Transactional(rollbackFor = Exception.class)
+    public void upgradeVipByTeamNum(Long uid) throws UserVIPUpgradeException {
+        vipTeamVerify(uid);
+    }
 
-	@Override
-	@RequestSerializableByKeyService(key = "#uid")
-	@Transactional(rollbackFor = Exception.class)
-	public void upgradeVipByTeamNum(Long uid) {
-		vipTeamVerify(uid);
-	}
+    @Override
+    @RequestSerializableByKeyService(key = "#tid")
+    @Transactional(rollbackFor = Exception.class)
+    public void upgradeBossVipByTeamNum(Long tid) throws UserVIPUpgradeException {
+        UserInfo boss = threeSaleSerivce.getBoss(tid);
+        if (boss == null) {
+            return;
+        }
+        vipTeamVerify(boss.getId());
+    }
 
-	@Override
-	@RequestSerializableByKeyService(key = "#tid")
-	@Transactional(rollbackFor = Exception.class)
-	public void upgradeBossVipByTeamNum(Long tid) {
-		UserInfo boss = threeSaleSerivce.getBoss(tid);
-		if (boss == null) {
-			return;
-		}
-		vipTeamVerify(boss.getId());
-	}
+    /**
+     * 楠岃瘉鐢ㄦ埛鏄惁婊¤冻鍗囩骇闃熷憳鏉′欢
+     *
+     * @param uid
+     */
+    private void vipTeamVerify(Long uid) throws UserVIPUpgradeException {
+        UserVIPPreInfo latest = getLatestProcessInfo(uid);
+        if (latest != null && latest.getProcess() == UserVIPPreInfo.PROCESS_2) {
+            return;
+        }
 
-	/**
-	 * 楠岃瘉鐢ㄦ埛鏄惁婊¤冻鍗囩骇闃熷憳鏉′欢
-	 * @param uid
-	 */
-	private void vipTeamVerify(Long uid) {
-		UserVIPPreInfo latest = getLatestProcessInfo(uid);
-		if (latest != null && latest.getProcess() == UserVIPPreInfo.PROCESS_2) {
-			return;
-		}
+        // 鏈夋晥绮変笣
+        int doneFirst = 0;
+        int doneSecond = 0;
+        UserInviteValidNum userInviteValidNum = userInviteValidNumService.selectByPrimaryKey(uid);
+        if (userInviteValidNum != null) {
+            doneFirst = userInviteValidNum.getNumFirst() == null ? 0 : userInviteValidNum.getNumFirst();
+            doneSecond = userInviteValidNum.getNumSecond() == null ? 0 : userInviteValidNum.getNumSecond();
+        }
 
-		// 鏈夋晥绮変笣
-		int doneFirst = 0;
-		int doneSecond = 0;
-		UserInviteValidNum userInviteValidNum = userInviteValidNumService.selectByPrimaryKey(uid);
-		if (userInviteValidNum != null) {
-			doneFirst = userInviteValidNum.getNumFirst() == null ? 0 : userInviteValidNum.getNumFirst();
-			doneSecond = userInviteValidNum.getNumSecond() == null ? 0 : userInviteValidNum.getNumSecond();
-		}
+        long limitFirst7 = 0;
+        String first7 = userVipConfigService.getValueByKey("vip_pre_7_first_level_team_count");
+        if (Constant.IS_TEST)
+            first7 = "30";
 
-		long limitFirst7 = 0;
-		String first7 = userVipConfigService.getValueByKey("vip_pre_7_first_level_team_count");
-		if (Constant.IS_TEST)
-			first7 = "30";
+        if (!StringUtil.isNullOrEmpty(first7)) {
+            limitFirst7 = Long.parseLong(first7);
+        }
 
-		if (!StringUtil.isNullOrEmpty(first7)) {
-			limitFirst7 = Long.parseLong(first7);
-		}
+        long limitSecond7 = 0;
+        String second7 = userVipConfigService.getValueByKey("vip_pre_7_second_level_team_count");
+        if (Constant.IS_TEST)
+            second7 = "30";
+        if (!StringUtil.isNullOrEmpty(second7)) {
+            limitSecond7 = Long.parseLong(second7);
+        }
 
-		long limitSecond7 = 0;
-		String second7 = userVipConfigService.getValueByKey("vip_pre_7_second_level_team_count");
-		if (Constant.IS_TEST)
-			second7 = "30";
-		if (!StringUtil.isNullOrEmpty(second7)) {
-			limitSecond7 = Long.parseLong(second7);
-		}
+        // 楠岃瘉鏄惁婊¤冻鍗囩骇楂樼骇浼氬憳
+        if (doneFirst >= limitFirst7 && doneSecond >= limitSecond7) {
+            try {
+                twoProcess(uid, limitFirst7, limitSecond7, true);
+            } catch (UserVIPPreInfoException e) {
+                throw new UserVIPUpgradeException(1, "鍗囩骇鍑洪敊:" + e.getMessage());
+            }
+        } else {
+            throw new UserVIPUpgradeException(2, "涓嶆弧瓒冲崌绾ф潯浠�:" + String.format("涓�绾ч槦鍛�:%s/%s  浜岀骇闃熷憳:%s/%s", doneFirst, limitFirst7, doneSecond, limitSecond7));
+        }
+    }
 
-		// 楠岃瘉鏄惁婊¤冻鍗囩骇楂樼骇浼氬憳
-		if (doneFirst >= limitFirst7 && doneSecond >= limitSecond7) {
-			try {
-				twoProcess(uid, limitFirst7, limitSecond7, true);
-			} catch (UserVIPPreInfoException e) {
+    /**
+     * 浜岄樁娈�
+     *
+     * @param uid
+     * @param countZiGou
+     * @param countShare
+     * @param firstTeam
+     * @param secondTeam
+     */
+    @Transactional(rollbackFor = Exception.class)
+    private void twoProcess(Long uid, long limit1, Long limit2, boolean teamPass) throws UserVIPPreInfoException {
+        String item = null;
+        if (teamPass) {
+            item = "鐩存帴+闂存帴绮変笣";
+        } else {
+            item = "杩斿埄+鍒嗕韩璁㈠崟";
+        }
 
-			}
-		}
-	}
+        Date upgradeTime = new Date();
+        UserVIPPreInfo info = new UserVIPPreInfo();
+        info.setUid(uid);
+        info.setProcess(UserVIPPreInfo.PROCESS_2);
+        info.setCreateTime(upgradeTime);
+        info.setUpdateTime(upgradeTime);
+        if (teamPass)
+            info.setSourceType(UserVIPPreInfo.SOURCE_TYPE_TEAM);
+        else
+            info.setSourceType(UserVIPPreInfo.SOURCE_TYPE_ORDER);
 
-	/**
-	 * 浜岄樁娈�
-	 * 
-	 * @param uid
-	 * @param countZiGou
-	 * @param countShare
-	 * @param firstTeam
-	 * @param secondTeam
-	 */
-	@Transactional(rollbackFor = Exception.class)
-	private void twoProcess(Long uid, long limit1, Long limit2, boolean teamPass) throws UserVIPPreInfoException {
-		String item = null;
-		if (teamPass) {
-			item = "鐩存帴+闂存帴绮変笣";
-		} else {
-			item = "杩斿埄+鍒嗕韩璁㈠崟";
-		}
+        addUserVIPPreInfo(info);
 
-		Date upgradeTime = new Date();
-		UserVIPPreInfo info = new UserVIPPreInfo();
-		info.setUid(uid);
-		info.setProcess(UserVIPPreInfo.PROCESS_2);
-		info.setCreateTime(upgradeTime);
-		info.setUpdateTime(upgradeTime);
-		if (teamPass)
-			info.setSourceType(UserVIPPreInfo.SOURCE_TYPE_TEAM);
-		else
-			info.setSourceType(UserVIPPreInfo.SOURCE_TYPE_ORDER);
+        // 鍗囩骇寮规鎻愮ず
+        UserLevelUpgradedNotify notify = new UserLevelUpgradedNotify();
+        notify.setUid(uid);
+        notify.setFromLevel(UserLevelEnum.daRen);
+        notify.setToLevel(UserLevelEnum.highVIP);
+        notify.setValid(true);
+        notify.setCreateTime(new Date());
+        userLevelUpgradedNotifyService.addUserLevelUpgradedNotify(notify);
 
-		addUserVIPPreInfo(info);
+        try {
+            // 鍗囩骇娑堟伅
+            Date registerTime = new Date(1577836800000L);
+            UserInfoRegister userInfoRegister = userInfoRegisterService.selectByPrimaryKey(uid);
+            if (userInfoRegister != null && userInfoRegister.getCreateTime() != null) {
+                registerTime = userInfoRegister.getCreateTime();
+            }
+            int daysBetween = TimeUtil.getDayDifferenceCount(registerTime, upgradeTime);
+            userAccountMsgNotificationService.vipPreUpgrade(uid, "蹇渷杈句汉", "楂樼骇浼氬憳", daysBetween, limit1, limit2, teamPass);
 
-		// 鍗囩骇寮规鎻愮ず
-		UserLevelUpgradedNotify notify = new UserLevelUpgradedNotify();
-		notify.setUid(uid);
-		notify.setFromLevel(UserLevelEnum.daRen);
-		notify.setToLevel(UserLevelEnum.highVIP);
-		notify.setValid(true);
-		notify.setCreateTime(new Date());
-		userLevelUpgradedNotifyService.addUserLevelUpgradedNotify(notify);
+            // 鐩存帴绮変笣鍗囩骇鎻愰啋
+            ThreeSale threeSale = threeSaleSerivce.getMyBoss(uid);
+            if (threeSale != null) {
+                Long bossId = threeSale.getBoss().getId();
+                UserInfo userInfo = userInfoService.selectByPKey(uid);
+                userInviteMsgNotificationService.fansUpgrade(bossId, "楂樼骇浼氬憳", userInfo.getNickName(), item, upgradeTime);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            LogHelper.error(e);
+        }
 
-		try {
-			// 鍗囩骇娑堟伅
-			Date registerTime = new Date(1577836800000L);
-			UserInfoRegister userInfoRegister = userInfoRegisterService.selectByPrimaryKey(uid);
-			if (userInfoRegister != null && userInfoRegister.getCreateTime() != null) {
-				registerTime = userInfoRegister.getCreateTime();
-			}
-			int daysBetween = TimeUtil.getDayDifferenceCount(registerTime, upgradeTime);
-			userAccountMsgNotificationService.vipPreUpgrade(uid, "蹇渷杈句汉", "楂樼骇浼氬憳", daysBetween, limit1, limit2, teamPass);
+    }
 
-			// 鐩存帴绮変笣鍗囩骇鎻愰啋
-			ThreeSale threeSale = threeSaleSerivce.getMyBoss(uid);
-			if (threeSale != null) {
-				Long bossId = threeSale.getBoss().getId();
-				UserInfo userInfo = userInfoService.selectByPKey(uid);
-				userInviteMsgNotificationService.fansUpgrade(bossId, "楂樼骇浼氬憳", userInfo.getNickName(), item, upgradeTime);
-			}
-		} catch (Exception e) {
-			e.printStackTrace();
-			LogHelper.error(e);
-		}
+    @Override
+    public UserVIPPreInfo selectByUidAndProcess(Long uid, int process) {
+        return userVIPPreInfoMapper.selectByUidAndProcess(uid, process);
+    }
 
-	}
+    @Override
+    public void deleteByPrimaryKey(Long id) {
+        userVIPPreInfoMapper.deleteByPrimaryKey(id);
+    }
 
-	@Override
-	public UserVIPPreInfo selectByUidAndProcess(Long uid, int process) {
-		return userVIPPreInfoMapper.selectByUidAndProcess(uid, process);
-	}
+    @Override
+    public List<UserVIPPreInfo> listByProcess(int process, Date minTime, Date maxTime, int page, int pageSize) {
+        return userVIPPreInfoMapper.listByProcess(process, minTime, maxTime, (page - 1) * pageSize, pageSize);
+    }
 
-	@Override
-	public void deleteByPrimaryKey(Long id) {
-		userVIPPreInfoMapper.deleteByPrimaryKey(id);
-	}
-
-	@Override
-	public List<UserVIPPreInfo> listByProcess(int process, Date minTime, Date maxTime, int page, int pageSize) {
-		return userVIPPreInfoMapper.listByProcess(process, minTime, maxTime, (page - 1) * pageSize, pageSize);
-	}
-
-	@Override
-	public long countByProcess(int process, Date minTime, Date maxTime) {
-		return userVIPPreInfoMapper.countByProcess(process, minTime, maxTime);
-	}
+    @Override
+    public long countByProcess(int process, Date minTime, Date maxTime) {
+        return userVIPPreInfoMapper.countByProcess(process, minTime, maxTime);
+    }
 
 }

--
Gitblit v1.8.0