admin
2019-04-15 debb3a579f798d71072f037f74e3e6b43b5fe0ee
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserLotteryRecordServiceImpl.java
@@ -92,6 +92,8 @@
         record.setUid(uid);
         record.setType(type);
         record.setCount(num);
      } else {
         record.setCount(num);
      }
      return record;
   }
@@ -164,14 +166,15 @@
         throw new UserLotteryRecordException(2, "抽奖次数不足");
      } 
      
      String prize = null;
      String couponType = null;
      // 新人抽奖 -已抽中奖品
      List<UserSystemCoupon> list = userSystemCouponService.getUserCouponBySource(uid, UserSystemCoupon.SOURCE_NEWBIES);
      String prize = null;
      if (list == null || list.size() == 0) {
         prize = getLotteryPrizeNewbies(count, 0, null);
      } else if (list.size() == 1) {
         String couponType = null;
         UserSystemCoupon userSystemCoupon = list.get(0);
         SystemCoupon systemCoupon = userSystemCoupon.getSystemCoupon();
         if (systemCoupon != null) {
@@ -185,6 +188,9 @@
      }
      
      if (prize == null || prize.trim().length() == 0) {
         prize = "NoPrize";
      } else if (prize.equals(couponType)) {
         // 已存在此券
         prize = "NoPrize";
      } else {
         try {
@@ -363,7 +369,7 @@
      String rebateCoupon = "rebateCoupon"; // 一张奖励券
      String doubleCoupon = "doubleCoupon"; // 两张奖励券
      
      if (count== 1) {
      if (count == 1) {
         // 剩余最后一次必中
         long result = (1 + Math.round(Math.random() * (9)));
         if (result <= 7) {