幸运数字 池子总数bug
This commit is contained in:
@@ -274,21 +274,22 @@ public class LuckyNumberActService {
|
||||
|
||||
String roundDate = now.format(DateTimeUtil.dateFormatter);
|
||||
|
||||
double price = config.getPrice().doubleValue() * numbers.size();
|
||||
int size = numbers.size();
|
||||
double price = config.getPrice().doubleValue() * size;
|
||||
|
||||
userPurseService.subDiamond(uid, price, BillObjTypeEnum.LUCKY_NUM_JACKPOT_INPUT_GOLD, (userPurse) -> {
|
||||
String objId = String.join("_", roundDate, uid.toString(), u.getPartitionId().toString(), JSONObject.toJSONString(numbers));
|
||||
billRecordService.insertGeneralBillRecord(uid, objId, BillObjTypeEnum.LUCKY_NUM_JACKPOT_INPUT_GOLD, price, userPurse);
|
||||
});
|
||||
|
||||
BigDecimal input = config.getPrice()
|
||||
BigDecimal oneInput = config.getPrice()
|
||||
.multiply(BigDecimal.valueOf(1.0).subtract(config.getJackpotRatio()))
|
||||
.setScale(2, RoundingMode.HALF_DOWN);
|
||||
for (Integer number : numbers) {
|
||||
playerRecordService.saveRecord(roundDate, uid, u.getPartitionId(), input, number);
|
||||
playerRecordService.saveRecord(roundDate, uid, u.getPartitionId(), oneInput, number);
|
||||
}
|
||||
|
||||
roundService.updateJackpot(roundDate, u.getPartitionId(), input);
|
||||
roundService.updateJackpot(roundDate, u.getPartitionId(), oneInput.multiply(BigDecimal.valueOf(size)));
|
||||
}
|
||||
|
||||
public void getJackpot(Long uid, String date) {
|
||||
|
Reference in New Issue
Block a user