yshop1.6发布:新增砍价功能,新增加锁功能,修复其他bug
This commit is contained in:
@ -2,6 +2,7 @@ package co.yixiang.utils;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
import java.text.DateFormat;
|
||||
@ -15,6 +16,18 @@ import java.util.Date;
|
||||
**/
|
||||
public class OrderUtil {
|
||||
|
||||
/**
|
||||
* 获取俩个数之间的随机数
|
||||
* @param min
|
||||
* @param max
|
||||
* @return
|
||||
*/
|
||||
public static Double randomNumber(double min,double max){
|
||||
return NumberUtil.add(min,
|
||||
NumberUtil.mul(Math.random(),
|
||||
NumberUtil.sub(max,min)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 时间戳订单号
|
||||
* @return
|
||||
|
Reference in New Issue
Block a user