| | |
| | | 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) {
|
| | |
| | | }
|
| | |
|
| | | if (prize == null || prize.trim().length() == 0) {
|
| | | prize = "NoPrize";
|
| | | } else if (prize.equals(couponType)) {
|
| | | // 已存在此券
|
| | | prize = "NoPrize";
|
| | | } else {
|
| | | try {
|
| | |
| | | String rebateCoupon = "rebateCoupon"; // 一张奖励券
|
| | | String doubleCoupon = "doubleCoupon"; // 两张奖励券
|
| | |
|
| | | if (count== 1) {
|
| | | if (count == 1) {
|
| | | // 剩余最后一次必中
|
| | | long result = (1 + Math.round(Math.random() * (9)));
|
| | | if (result <= 7) {
|