星级厨房重构-修复用户记录里的中奖状态判断异常

This commit is contained in:
2023-03-05 13:25:10 +08:00
parent 70d270d056
commit d0986527d7

View File

@@ -64,7 +64,10 @@ public class LuckySeaSettlementServiceImpl implements LuckySeaSettlementService
Map<Long, Byte> userDrawStatusMap = new HashMap<>(drawUserRecordList.size());
Map<Long, List<LuckySeaUserDrawRecord>> userDrawRecordMap = new HashMap<>(drawUserRecordList.size());
for (LuckySeaUserDrawRecord record : drawUserRecordList) {
userDrawStatusMap.computeIfAbsent(record.getUid(), k -> record.getDrawStatus());
Byte drawStatus = userDrawStatusMap.get(record.getUid());
if (null == drawStatus || drawStatus > record.getDrawStatus()){
userDrawStatusMap.put(record.getUid(), record.getDrawStatus());
}
List<LuckySeaUserDrawRecord> userDrawRecord = userDrawRecordMap.get(record.getUid());
if (CollectionUtils.isEmpty(userDrawRecord)) {