admin
2020-01-07 6fdcc0c26dd33e87a024a69ed635d9aedb59cad6
fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPInfoServiceImpl.java
@@ -86,7 +86,7 @@
   @Override
   @Transactional
   @Transactional(rollbackFor = Exception.class)
   public void addUserVIPInfo(UserVIPInfo info) throws UserVIPInfoException {
      if (info.getId() == null) {
         throw new UserVIPInfoException(1, "信息不完整");
@@ -207,7 +207,7 @@
      userOtherMsgNotificationService.teamVIPCallBoss(bossId, "如有疑问请联系我的-人工客服", msgboss);
   }
   
   @Transactional
   @Transactional(rollbackFor = Exception.class)
   @Override
   public void rejectVIPApply(Long uid, String reason) throws UserVIPInfoException {
      UserVIPInfo userInfo = userVIPInfoMapper.selectByPrimaryKeyForUpdate(uid);
@@ -231,7 +231,7 @@
      userOtherMsgNotificationService.rejectVIPApply(uid, "如有疑问请联系我的-人工客服", msgOther);
   }
   @Transactional
   @Transactional(rollbackFor = Exception.class)
   @Override
   public void applyVIP(Long uid) throws UserVIPInfoException {
      UserVIPInfo userInfo = userVIPInfoMapper.selectByPrimaryKeyForUpdate(uid);
@@ -297,6 +297,12 @@
      if (extra == null) 
         return false;
      
      // 1、直接粉丝(从 2020 年 1 月 1 日起直接粉丝产生有效订单)
      BigDecimal payMoney = new BigDecimal(userVipConfigService.getValueByKey("require_order_pay"));
      long teamNum = hongBaoV2CountService.countValidOrderTeamUserByUid(uid, TimeUtil.convertDateToTemp(Constant.VIP_ONLINE_TIME), payMoney);
      // 区分老用户和新用户
      String limtDate = userVipConfigService.getValueByKey("vip_execute_time");
      Date executeDate = null;
      try {
@@ -308,9 +314,6 @@
      if (executeDate == null)
         return false;
      
      // 1、直接粉丝(从 2020 年 1 月 1 日起直接粉丝产生有效订单)
      BigDecimal payMoney = new BigDecimal(userVipConfigService.getValueByKey("require_order_pay"));
      long teamNum = hongBaoV2CountService.countValidOrderTeamUserByUid(uid, executeDate.getTime(), payMoney);
      if (extra.getFirstLoginTime() == null || extra.getFirstLoginTime().getTime() < executeDate.getTime()) {
         long limitNum = Long.parseLong(userVipConfigService.getValueByKey("require_invite_num_old_user"));
         if (teamNum < limitNum)
@@ -358,6 +361,7 @@
   
   
   @Override
   @Transactional(rollbackFor = Exception.class)
   public void inviteSeparate(Long workerId, Long bossId) {
      if (workerId == null || bossId == null)
         return;