|
@@ -94,9 +94,9 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
|
|
|
String specifiedDay = lifeDiscountCoupon.getSpecifiedDay();
|
|
String specifiedDay = lifeDiscountCoupon.getSpecifiedDay();
|
|
|
if(!StringUtils.isEmpty(specifiedDay)){
|
|
if(!StringUtils.isEmpty(specifiedDay)){
|
|
|
int sDay = Integer.parseInt(specifiedDay);
|
|
int sDay = Integer.parseInt(specifiedDay);
|
|
|
- if(sDay > 0 && lifeDiscountCouponDto.getBeginGetDate() != null){
|
|
|
|
|
- Date beginGetDate = Date.from(lifeDiscountCouponDto.getBeginGetDate().atStartOfDay(ZoneId.systemDefault()).toInstant());
|
|
|
|
|
- Date validDate = addDaysToDateJava8(beginGetDate, sDay);
|
|
|
|
|
|
|
+ if(sDay > 0 && lifeDiscountCouponDto.getEndGetDate() != null){
|
|
|
|
|
+ Date endGetDate = Date.from(lifeDiscountCouponDto.getEndGetDate().atStartOfDay(ZoneId.systemDefault()).toInstant());
|
|
|
|
|
+ Date validDate = addDaysToDateJava8(endGetDate, sDay);
|
|
|
LocalDate validDateLocalDate = validDate.toInstant()
|
|
LocalDate validDateLocalDate = validDate.toInstant()
|
|
|
.atZone(ZoneId.systemDefault())
|
|
.atZone(ZoneId.systemDefault())
|
|
|
.toLocalDate();
|
|
.toLocalDate();
|
|
@@ -189,9 +189,9 @@ public class LifeDiscountCouponServiceImpl extends ServiceImpl<LifeDiscountCoupo
|
|
|
String specifiedDay = lifeDiscountCouponDto.getSpecifiedDay();
|
|
String specifiedDay = lifeDiscountCouponDto.getSpecifiedDay();
|
|
|
if(!StringUtils.isEmpty(specifiedDay)){
|
|
if(!StringUtils.isEmpty(specifiedDay)){
|
|
|
int sDay = Integer.parseInt(specifiedDay);
|
|
int sDay = Integer.parseInt(specifiedDay);
|
|
|
- if(sDay > 0 && lifeDiscountCouponDto.getBeginGetDate() != null) {
|
|
|
|
|
- Date beginGetDate = Date.from(lifeDiscountCouponDto.getBeginGetDate().atStartOfDay(ZoneId.systemDefault()).toInstant());
|
|
|
|
|
- Date validDate = addDaysToDateJava8(beginGetDate, sDay);
|
|
|
|
|
|
|
+ if(sDay > 0 && lifeDiscountCouponDto.getEndGetDate() != null) {
|
|
|
|
|
+ Date endGetDate = Date.from(lifeDiscountCouponDto.getEndGetDate().atStartOfDay(ZoneId.systemDefault()).toInstant());
|
|
|
|
|
+ Date validDate = addDaysToDateJava8(endGetDate, sDay);
|
|
|
LocalDate validDateLocalDate = validDate.toInstant()
|
|
LocalDate validDateLocalDate = validDate.toInstant()
|
|
|
.atZone(ZoneId.systemDefault())
|
|
.atZone(ZoneId.systemDefault())
|
|
|
.toLocalDate();
|
|
.toLocalDate();
|