| | |
| | | if (StringUtil.isNullOrEmpty(parseToken))
|
| | | throw new TokenRecordException(1, "未发现口令");
|
| | |
|
| | | TokenRecord rokenRecord = tokenRecordMapper.getByToken(token);
|
| | | TokenRecord rokenRecord = tokenRecordMapper.getByToken(parseToken);
|
| | | if (rokenRecord == null)
|
| | | throw new TokenRecordException(1, "口令不存在");
|
| | |
|
| | | Long uidToken = rokenRecord.getUid();
|
| | | if (uid != null && uidToken != null && uid.longValue() == uidToken.longValue())
|
| | | throw new TokenRecordException(1, "不能自己赠送给自己");
|
| | | |
| | | Date now = new Date();
|
| | | Date endTimeToken = rokenRecord.getEndTime();
|
| | | Integer stateTtoken = rokenRecord.getState();
|
| | |
| | |
|
| | | TokenVO tokenVO = new TokenVO();
|
| | | tokenVO.setAmount(num);
|
| | | tokenVO.setToken(token);
|
| | | tokenVO.setToken(parseToken);
|
| | | tokenVO.setNickName(nickName + "赠送");
|
| | | tokenVO.setPortrait(portrait);
|
| | | tokenVO.setTips(tips);
|
| | |
| | | TokenRecord rokenRecord = tokenRecordMapper.getByToken(token);
|
| | | if (rokenRecord == null)
|
| | | throw new TokenRecordException(1, "口令已失效");
|
| | |
|
| | | |
| | | Long uidToken = rokenRecord.getUid();
|
| | | if (uidToken != null && uid.longValue() == uidToken.longValue())
|
| | | throw new TokenRecordException(1, "不能自己赠送给自己");
|
| | | |
| | | Date now = new Date();
|
| | | Date endTimeToken = rokenRecord.getEndTime();
|
| | | if (endTimeToken != null && endTimeToken.getTime() < now.getTime())
|
| | |
| | | msgOther.setType(MsgOtherGiveContentDTO.TYEP_COUPON);
|
| | | msgOther.setTitle("赠送免单券");
|
| | | msgOther.setGiveType("你赠送的免单券被成功领取");
|
| | | msgOther.setReceiveInfo("昵称: " + userName + " ID:" + uid);
|
| | | msgOther.setReceiveInfo("昵称: :" + userName + " ID:" + uid);
|
| | | msgOther.setGiveTime(sd.format(giveRecord.getGiveTime()));
|
| | | msgOther.setReceiveTime(sd.format(new Date()));
|
| | | userOtherMsgNotificationService.tokenGiveMsg(giveUid, beiZhu, msgOther);
|
| | |
| | | userName = user.getNickName();
|
| | |
|
| | | MsgOtherGiveContentDTO msgOther = new MsgOtherGiveContentDTO();
|
| | | msgOther.setType(MsgOtherGiveContentDTO.TYEP_COUPON);
|
| | | msgOther.setType(MsgOtherGiveContentDTO.TYEP_TLJ);
|
| | | msgOther.setTitle("赠送推广红包");
|
| | | msgOther.setGiveType("你赠送的推广红包被成功领取");
|
| | | msgOther.setReceiveInfo("昵称: " + userName + " ID:" + uid);
|