|
@@ -1,6 +1,7 @@
|
|
|
package com.minpay.common.service.impl;
|
|
|
|
|
|
import com.minpay.common.bean.DrawDto;
|
|
|
+import com.minpay.common.constant.Constant;
|
|
|
import com.minpay.common.exception.BusinessCodeException;
|
|
|
import com.minpay.common.service.IAccountService;
|
|
|
import com.minpay.common.service.IDrawService;
|
|
@@ -75,8 +76,8 @@ public class DrawServiceImpl implements IDrawService {
|
|
|
BigDecimal bigUse = new BigDecimal(useOrderId);
|
|
|
useOrderId = bigUse.setScale(0, BigDecimal.ROUND_HALF_DOWN).toString();
|
|
|
}else{
|
|
|
- String ordid = getRandomNickname(10);
|
|
|
- System.out.println("生成随机数字10位数:" + getRandomNickname(10));
|
|
|
+ String ordid = Constant.getRandomNickname(10);
|
|
|
+ System.out.println("生成随机数字10位数:" + ordid);
|
|
|
useOrderId = ordid;
|
|
|
}
|
|
|
|
|
@@ -240,13 +241,4 @@ public class DrawServiceImpl implements IDrawService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public static String getRandomNickname(int length) {
|
|
|
- String val = "";
|
|
|
- Random random = new Random();
|
|
|
- for (int i = 0; i < length; i++) {
|
|
|
- val += String.valueOf(random.nextInt(10));
|
|
|
- }
|
|
|
- return val;
|
|
|
- }
|
|
|
-
|
|
|
}
|