private String generateCode() { int min = 100000; int max = 1000000; Random rand = new Random(); int res = this.rand.nextInt(max - min) + min; return String.valueOf(res); } 来源:https://www.cnblogs.com/smileblogs/p/12208047.html 标签 随机数 random