| | |
| | | String thing = "";
|
| | | String thingNum = "";
|
| | | int couponNews = 0;
|
| | | boolean once = false; // 兑换一次是否消失
|
| | | try {
|
| | | if (ExchangeTypeEnum.freeCouponBuy == type) {
|
| | | thing = "自购免单券";
|
| | | thingNum = "1张";
|
| | | userSystemCouponService.exchangeCoupon(uid, type.name(), UserSystemCoupon.SOURCE_EXCHANGE, null);
|
| | | |
| | | once = true; |
| | | couponNews = 1;
|
| | | } else if (ExchangeTypeEnum.freeCouponGive == type) {
|
| | | thing = "赠送免单券";
|
| | |
| | | if(codePublishRecordService.countValidRecord(uid) > 0)
|
| | | throw new IntegralExchangeException(1, "三天之内不可重复兑换");
|
| | | codePublishRecordService.publishInviteCode(uid);
|
| | | |
| | | exchange.setNeedJump(true);
|
| | | exchange.setBtnName("去查看");
|
| | | } else if (ExchangeTypeEnum.taoLiJin == type) {
|
| | | thing = "推广红包";
|
| | | thingNum = exchange.getAmount() + "元";
|
| | |
| | | }
|
| | | });
|
| | |
|
| | | if (once) // 兑换之后消失
|
| | | exchange = null;
|
| | | |
| | | return exchange;
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|