|  |  |  | 
|---|
|  |  |  | package cc.mrbird.febs.common.utils; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import cn.hutool.core.util.StrUtil; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.util.Random; | 
|---|
|  |  |  | 
|---|
|  |  |  | return sb.toString(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static String getOrderNum() { | 
|---|
|  |  |  | public static String getOrderNum(String prefix) { | 
|---|
|  |  |  | SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss"); | 
|---|
|  |  |  | String dd=df.format(new Date()); | 
|---|
|  |  |  | if (StrUtil.isNotBlank(prefix)) { | 
|---|
|  |  |  | return prefix+dd+getRandomNum(5); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return dd+getRandomNum(5); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static String getOrderNum() { | 
|---|
|  |  |  | return getOrderNum(null); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|