获取很小的 随机数
This commit is contained in:
@@ -183,5 +183,12 @@ public class DiscSpinningServiceImpl extends ServiceImpl<DiscSpinningDao, DiscSp
|
|||||||
receiveAsync(record);
|
receiveAsync(record);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static BigDecimal getSmallDouble(int maxValue) {
|
||||||
|
Random random = new Random();
|
||||||
|
int value = random.nextInt(maxValue) * random.nextInt(maxValue);
|
||||||
|
return new BigDecimal(value / 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user