Skip to content

Commit

Permalink
optimise the code of redpacket
Browse files Browse the repository at this point in the history
  • Loading branch information
liberhe committed Dec 18, 2023
1 parent 195eda6 commit 1b0aea5
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,18 +104,19 @@ public void updateRedpacketStatus() throws IOException {
}


if (claimers.size() > redPacket.getClaimedAddress().size()) {
log.info("update claimed address : " + id);
redPacketRepository.save(redPacket);
}
// if (claimers.size() > redPacket.getClaimedAddress().size()) {
// log.info("update claimed address : " + id);
// redPacketRepository.save(redPacket);
// }

//refund
Boolean claimed = redpacketObject.get("hasRefundedOrAllClaimed").getAsBoolean();
if (claimed) {
log.info("redpacket id: " + id + "claimed: ");
redPacket.setStatus(1);
redPacketRepository.save(redPacket);
}

redPacketRepository.save(redPacket);
}
}
}
Expand Down

0 comments on commit 1b0aea5

Please sign in to comment.