标签:new padleft return ++ class 生成 code public ati
#region 订单号生成(支持每秒1000个并发) private static object locker = new object(); private static int sn = 0; public static string GetOrderNO() { lock (locker) { if (sn == 999) sn = 0; else sn++; return DateTime.Now.ToString("yyMMddHHmmssfff") + sn.ToString().PadLeft(3, ‘0‘); } } #endregion
标签:new padleft return ++ class 生成 code public ati
原文地址:https://www.cnblogs.com/jfeng/p/11024483.html