<<<<<<< HEAD package com.template.common.utils; import java.util.Random; public class GetVertifyCode { public static String getRandomNumCode(int number){ String codeNum = ""; int [] numbers = {0,1,2,3,4,5,6,7,8,9}; Random random = new Random(); for (int i = 0; i < number; i++) { int next = random.nextInt(10000); codeNum+=numbers[next%10]; } return codeNum; } } ======= package com.template.common.utils; import java.util.Random; public class GetVertifyCode { public static String getRandomNumCode(int number){ String codeNum = ""; int [] numbers = {0,1,2,3,4,5,6,7,8,9}; Random random = new Random(); for (int i = 0; i < number; i++) { int next = random.nextInt(10000); codeNum+=numbers[next%10]; } return codeNum; } } >>>>>>> 7af63d5b21d6f0f53dd52bea2fab86f52d94f5ff