| | |
| | | if (user != null && !StringUtil.isNullOrEmpty(user.getNickName()))
|
| | | userName = user.getNickName();
|
| | | MsgRedPackGiveContentDTO givedto = new MsgRedPackGiveContentDTO();
|
| | | givedto.setTitle("红包领取");
|
| | | givedto.setTitle("红包赠送");
|
| | | givedto.setUserInfo("昵称:" + userName + " ID:" + uid);
|
| | | givedto.setTime(sd.format(new Date()));
|
| | | givedto.setMoney("¥" + giveRecord.getAmount().setScale(2));
|
| | |
| | | return;
|
| | | Date date = new Date();
|
| | | for (TokenRecord tokenRecord: list) {
|
| | | Integer state = tokenRecord.getState();
|
| | | if (state != null && state == 0) |
| | | continue;
|
| | | |
| | | tokenRecord.setState(1);
|
| | | tokenRecord.setUpdateTime(date);
|
| | | tokenRecordMapper.updateByPrimaryKeySelective(tokenRecord);
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public void invalidByRedPack(Long id) {
|
| | | if (id == null)
|
| | | return;
|
| | | |
| | | List<String> list = new ArrayList<String>();
|
| | | list.add(TokenTypeEnum.redPack.name());
|
| | | tokenRecordMapper.invalidByTypeAndIdentify(list, id.toString());
|
| | | }
|
| | | |
| | | @Override
|
| | | public void invalidByCoupon(Long id) {
|
| | | if (id == null)
|
| | | return;
|
| | | |
| | | List<String> list = new ArrayList<String>();
|
| | | list.add(TokenTypeEnum.freeCoupon.name());
|
| | | list.add(TokenTypeEnum.rebatePercentCoupon.name());
|
| | | tokenRecordMapper.invalidByTypeAndIdentify(list, id.toString());
|
| | | }
|
| | | }
|