yujian
2019-11-12 46a33cb062800fe051a75dd025a57d70994217d5
fanli/src/main/java/com/yeshi/fanli/service/impl/user/TokenRecordServiceImpl.java
@@ -542,7 +542,7 @@
                  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));
@@ -617,9 +617,35 @@
         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());
   }
}