|
|
|
@ -111,21 +111,26 @@ public class AwardRecordServiceImpl extends BaseServiceImpl<AwardRecordMapper, A
|
|
|
|
|
}else {
|
|
|
|
|
int range = (int) (1 / awardRate);
|
|
|
|
|
int num = 1 + (int)(Math.random()*(range - 1 + 1));
|
|
|
|
|
System.out.println("range" + range);
|
|
|
|
|
System.out.println("num" + num);
|
|
|
|
|
Integer awardNum = awardRule.getAwardNum();
|
|
|
|
|
if ( 0 == isHaveBigAward){
|
|
|
|
|
//无大奖
|
|
|
|
|
if (awardNum > 0){
|
|
|
|
|
if (1 == num){
|
|
|
|
|
//中小奖
|
|
|
|
|
isAward = true;
|
|
|
|
|
}else {
|
|
|
|
|
logger.info("未中奖");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
//有大奖
|
|
|
|
|
if (awardNum > 0){
|
|
|
|
|
if (1 == num){
|
|
|
|
|
//中小奖
|
|
|
|
|
isAward = true;
|
|
|
|
|
}else if (2 == num){
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (2 == num){
|
|
|
|
|
isAward = true;
|
|
|
|
|
isBigAward = true;
|
|
|
|
|
}else {
|
|
|
|
|