package com.odcc.cpzidc.common.utils.sms; public class SMSCoder { public static String generateCode() { // 生成随机6位码 String s = ""; while (s.length() < 6) { s += (int) (Math.random() * 10); } return s; } public static void main(String args[]) { System.out.println(SMSCoder.generateCode()); } }