package com.yeshi.fanli.util.shop;
|
|
import com.yeshi.fanli.util.TimeUtil;
|
|
public class BanLiShopUtil {
|
|
/**
|
* 制造订单号
|
*
|
* @param orderId
|
* @return
|
*/
|
public static String createOrderNo(Long orderId) {
|
String orderNo = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyyMMdd");
|
String orderIdStr = orderId + "";
|
int length = 8 - orderIdStr.length();
|
for (int i = 0; i < length; i++) {
|
orderIdStr = "0" + orderIdStr;
|
}
|
orderNo += orderIdStr;
|
return orderNo;
|
}
|
|
}
|