public static String getCodeOfFive(String prefix, int nowNum) {
//需要返回的code
StringBuilder codeSb = new StringBuilder();
//需要拼接的数字
StringBuilder numSb = new StringBuilder();
//封装的数字对象,里面 value 加了 volatile关键字,保证了线程安全
AtomicInteger count = new AtomicInteger(nowNum);
//将数值补足为5位字符串
numSb.append(String.format("%05d", count.get()));
//先拼接前缀
codeSb.append(prefix);
//再拼接数字
codeSb.append(numSb);
return codeSb.toString();
}