yujian
2019-09-12 e6269b00183bf7f46c494fa15ab75d702d2764ab
红包口令  失效金额bug
1个文件已修改
16 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java
@@ -221,20 +221,22 @@
            }
        } else if (tokenType == TokenTypeEnum.taoLiJin) {
            type = 12;
            UserTaoLiJinGiveRecord giveRecord = userTaoLiJinGiveRecordService
                    .selectByPrimaryKey(Long.parseLong(identify));
            if (giveRecord == null || giveRecord.getState() == UserTaoLiJinGiveRecord.STATE_OVERDUE) {
            UserTaoLiJinGiveRecord giveRecord = userTaoLiJinGiveRecordService.selectByPrimaryKey(Long.parseLong(identify));
            if (giveRecord == null)
                throw new TokenRecordException(1, "口令已失效");
            BigDecimal amount = giveRecord.getAmount();
            num = Integer.parseInt(amount.setScale(0).toString());
            if(giveRecord.getState() == UserTaoLiJinGiveRecord.STATE_OVERDUE) {
                tips.add("哎呀,推广红包已失效了!");
            } else if (giveRecord.getState() == UserTaoLiJinGiveRecord.STATE_RECEIVE) {
                tips.add("哎呀,推广红包已被领取了!");
            } else if (giveRecord.getState() == UserTaoLiJinGiveRecord.STATE_INIT) {
                if (uid == null || uid <= 0)
                    throw new TokenRecordException(1001, "温馨提示,[推广红包]需要登录后领取");
                state = true;
                BigDecimal amount = giveRecord.getAmount();
                num = Integer.parseInt(amount.setScale(0).toString());
                UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid);
                if (userInfoExtra == null || StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode())) {
                    tips.add("确认领取后,你将成为赠送者的一级队员;");