|
|
|
@ -7,10 +7,10 @@ import java.util.Random; |
|
|
|
public class OrderUtil { |
|
|
|
|
|
|
|
/** |
|
|
|
* 生成流水(不超过32位) |
|
|
|
* 生成流水(不超过40位) |
|
|
|
* |
|
|
|
* @frontStr 费用类型 RV=充值会员 |
|
|
|
* @return 2费用类型+14时间+2客户端类型+11userId+3随机位 |
|
|
|
* @return 2费用类型+14时间+2客户端类型+19userId+3随机位 |
|
|
|
*/ |
|
|
|
public static String getOrderNo(String frontStr, Date curTime, String userClientType, String userId) { |
|
|
|
SimpleDateFormat simple = new SimpleDateFormat("yyyyMMddHHmmss"); |
|
|
|
@ -25,6 +25,6 @@ public class OrderUtil { |
|
|
|
} |
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
System.out.println(getOrderNo("RV",new Date(),"DU","12345678910")); |
|
|
|
System.out.println(getOrderNo("RV",new Date(),"DU","1234567891012345697")); |
|
|
|
} |
|
|
|
} |
|
|
|
|