admin
2020-04-02 b9b613a285ebe0da27ca7dd2c3434c8c917abb74
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/ThreeSaleSerivceImpl.java
@@ -670,5 +670,47 @@
      return deepList;
   }
   @Override
   public void remvoeBreak(Long id, Long uid, Long tid) {
      ThreeSale threeSale = threeSaleMapper.selectByPrimaryKey(id);
      if (threeSale == null) {
         return;
      }
      Long workerId = threeSale.getWorker().getId();
      if (tid.longValue() != workerId.longValue()) {
         return;
      }
      Integer expire = threeSale.getExpire();
      if (expire == ThreeSale.EXPIRE_NORMAL) {
         return;
      }
      int upExpire = expire;
      Long bossId = threeSale.getBoss().getId();
      if (bossId.longValue() == uid.longValue()) { // 直接粉丝
         if (expire == ThreeSale.EXPIRE_BREAK_VIP_DEL4) {
            upExpire =ThreeSale.EXPIRE_BREAK_VIP_DEL34;
         } else {
            upExpire = ThreeSale.EXPIRE_BREAK_VIP_DEL3;
         }
      } else { // 间接粉丝
         if (expire == ThreeSale.EXPIRE_BREAK_VIP_DEL3) {
            upExpire =ThreeSale.EXPIRE_BREAK_VIP_DEL34;
         } else {
            upExpire = ThreeSale.EXPIRE_BREAK_VIP_DEL4;
         }
      }
      ThreeSale update = new ThreeSale();
      update.setId(id);
      update.setExpire(upExpire);
      update.setUpdateTime(java.lang.System.currentTimeMillis());
      threeSaleMapper.updateByPrimaryKeySelective(update);
   }
}