Commit 8f31f60e by caosy

单订场抵扣劵 产品抵扣劵 自动一年

parent 9781123a
...@@ -90,6 +90,28 @@ public class DateUtil { ...@@ -90,6 +90,28 @@ public class DateUtil {
return calender.getTime(); return calender.getTime();
} }
public static Date addYears(int years, Date date) {
Calendar calender = Calendar.getInstance();
calender.setTime(date);
calender.add(Calendar.YEAR, years);
return calender.getTime();
}
/**
* 获取天 的最后时分秒 59:59:59
* @param date
* @return
*/
public static Date getEndOfDay(Date date) {
Calendar calendarEnd = Calendar.getInstance();
calendarEnd.setTime(date);
calendarEnd.set(Calendar.HOUR_OF_DAY, 23);
calendarEnd.set(Calendar.MINUTE, 59);
calendarEnd.set(Calendar.SECOND, 59);
calendarEnd.set(Calendar.MILLISECOND, 0);
return calendarEnd.getTime();
}
/** /**
* @throws ParseException * @throws ParseException
* *
......
...@@ -27,7 +27,7 @@ public enum VoucherTypeEnum { ...@@ -27,7 +27,7 @@ public enum VoucherTypeEnum {
TRAIN_VOUCHER(8, "培训券", new TrainVoucherRuleConditionBean()), TRAIN_VOUCHER(8, "培训券", new TrainVoucherRuleConditionBean()),
GENERAL_VOUCHER(9, "通用劵(会员、套票、培训)", new GeneralVoucherRuleConditionBean()); GENERAL_VOUCHER(9, "通用劵(套票、培训)", new GeneralVoucherRuleConditionBean());
private int value; private int value;
private String msg; private String msg;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment