Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
caosy
/
fun-common
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8f31f60e
authored
Oct 28, 2022
by
caosy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单订场抵扣劵 产品抵扣劵 自动一年
parent
9781123a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletions
fun-common-core/src/main/java/com/ctrip/fun/common/core/util/DateUtil.java
fun-common-vo/src/main/java/com/ctrip/fun/common/vo/basic/VoucherTypeEnum.java
fun-common-core/src/main/java/com/ctrip/fun/common/core/util/DateUtil.java
View file @
8f31f60e
...
@@ -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
*
*
...
...
fun-common-vo/src/main/java/com/ctrip/fun/common/vo/basic/VoucherTypeEnum.java
View file @
8f31f60e
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment