给租户增加有效期

This commit is contained in:
季圣华
2021-08-25 00:44:05 +08:00
parent ce1ca8beed
commit be9786087f
12 changed files with 91 additions and 24 deletions

View File

@@ -665,6 +665,14 @@ public class Tools {
return new SimpleDateFormat(pattern).parse(strDate);
}
public static Date addDays(Date date, int num) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(date); //需要将date数据转移到Calender对象中操作
calendar.add(calendar.DATE, num);//把日期往后增加n天.正数往后推,负数往前移动
date=calendar.getTime(); //这个时间就是日期往后推一天的结果
return date;
}
/**
* 生成随机数字和字母组合
* @param length