mirror of
https://github.com/yangzongzhuan/RuoYi-Cloud.git
synced 2025-09-03 19:27:59 +00:00
优化代码
This commit is contained in:
@@ -60,10 +60,9 @@ public class UserConstants
|
||||
/** InnerLink组件标识 */
|
||||
public final static String INNER_LINK = "InnerLink";
|
||||
|
||||
/** 校验返回结果码 */
|
||||
public final static String UNIQUE = "0";
|
||||
|
||||
public final static String NOT_UNIQUE = "1";
|
||||
/** 校验是否唯一的返回标识 */
|
||||
public final static boolean UNIQUE = true;
|
||||
public final static boolean NOT_UNIQUE = false;
|
||||
|
||||
/**
|
||||
* 用户名长度限制
|
||||
|
@@ -137,16 +137,20 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算两个时间差
|
||||
* 计算时间差
|
||||
*
|
||||
* @param endTime 最后时间
|
||||
* @param startTime 开始时间
|
||||
* @return 时间差(天/小时/分钟)
|
||||
*/
|
||||
public static String getDatePoor(Date endDate, Date nowDate)
|
||||
public static String timeDistance(Date endDate, Date startTime)
|
||||
{
|
||||
long nd = 1000 * 24 * 60 * 60;
|
||||
long nh = 1000 * 60 * 60;
|
||||
long nm = 1000 * 60;
|
||||
// long ns = 1000;
|
||||
// 获得两个时间的毫秒时间差异
|
||||
long diff = endDate.getTime() - nowDate.getTime();
|
||||
long diff = endDate.getTime() - startTime.getTime();
|
||||
// 计算差多少天
|
||||
long day = diff / nd;
|
||||
// 计算差多少小时
|
||||
|
@@ -22,7 +22,7 @@ public class Seq
|
||||
private static AtomicInteger uploadSeq = new AtomicInteger(1);
|
||||
|
||||
// 机器标识
|
||||
private static String machineCode = "A";
|
||||
private static final String machineCode = "A";
|
||||
|
||||
/**
|
||||
* 获取通用序列号
|
||||
|
Reference in New Issue
Block a user