admin
2019-03-04 4b80d2dab78d0cef3d149a0a11240b5e39b581a3
fanli/src/main/java/com/yeshi/fanli/controller/client/UserCouponController.java
@@ -80,8 +80,6 @@
   @Resource
   private ThreeSaleSerivce threeSaleSerivce;
   // 最大抽奖次数
   private static int MAX_COUNT = 5;
   /**
    * 用户券列表查询
@@ -462,10 +460,10 @@
            List<DeviceLotteryRecord> list = deviceLotteryRecordService.listByPlatformAndDevice(platformType,
                  device);
            if (list != null && list.size() == MAX_COUNT) { // 无抽奖机会
            if (list != null && list.size() == Constant.MAX_COUNT_LOTTERY_NEWBIES) { // 无抽奖机会
               JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(2, "抽奖次数不足"));
               return;
            } else if (list != null && list.size() < MAX_COUNT) { // 拥有抽奖机会
            } else if (list != null && list.size() < Constant.MAX_COUNT_LOTTERY_NEWBIES) { // 拥有抽奖机会
               for (DeviceLotteryRecord deviceLotteryRecord : list) {
                  Long systemCouponId = deviceLotteryRecord.getSystemCouponId();
@@ -481,14 +479,14 @@
                  hasPrize = coupon.getType().name();
               }
               count = MAX_COUNT - 1 - list.size();
               count = Constant.MAX_COUNT_LOTTERY_NEWBIES - 1 - list.size();
            } else {
               count = MAX_COUNT - 1;
               count = Constant.MAX_COUNT_LOTTERY_NEWBIES - 1;
            }
            // 奖品
            prize = getLotteryPrize(MAX_COUNT, countPrize, list.size(), couponId);
            prize = getLotteryPrize(Constant.MAX_COUNT_LOTTERY_NEWBIES, countPrize, list.size(), couponId);
            // 抽中
            Long newCouponId = null;
            if (prize != null && prize.trim().length() > 0) {
@@ -533,7 +531,7 @@
            }
            // 奖品
            prize = getLotteryPrize(MAX_COUNT, list.size(), MAX_COUNT - lotteryNewbies, couponId);
            prize = getLotteryPrize(Constant.MAX_COUNT_LOTTERY_NEWBIES, list.size(), Constant.MAX_COUNT_LOTTERY_NEWBIES - lotteryNewbies, couponId);
            // 抽中
            if (prize != null && prize.trim().length() > 0) {