bravo-settlement-output小于0不处理
This commit is contained in:
@@ -92,6 +92,11 @@ public class BravoGiftSendService {
|
||||
BigDecimal totalInput = BigDecimal.valueOf(recordMap.size() * everyGiftNum * gift.getGoldPrice());
|
||||
BigDecimal totalOutput = recordMap.values().stream().map(BravoRecord::getWinGoldNum).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
BigDecimal outputMultiple = totalOutput.compareTo(BigDecimal.ZERO) > 0? totalOutput.divide(totalInput, 2, RoundingMode.DOWN): BigDecimal.ZERO;
|
||||
|
||||
if (totalOutput.compareTo(BigDecimal.ZERO) <= 0){
|
||||
return;
|
||||
}
|
||||
|
||||
settlementService.sendReward(config, senderUid, room, gift, recordMap, totalOutput, outputMultiple);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user