| | |
| | | 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());
|
| | | }
|
| | | }
|