|
|
@ -219,7 +219,6 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp |
|
|
|
vo.setEmpCardGift(empCardGift); |
|
|
|
vo.setOrderCardVoList(lpkReserveOrderCardVos); |
|
|
|
vo.setGoodsVos(goodsVos); |
|
|
|
System.out.println("----------------------------------"+vo); |
|
|
|
return rb.success().setData(vo); |
|
|
|
} |
|
|
|
|
|
|
@ -588,13 +587,16 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp |
|
|
|
|
|
|
|
public ResultBean<Object> isSaturAndSun(String cardSid) { |
|
|
|
ResultBean rb = new ResultBean().fail(); |
|
|
|
AppletVo vo = getGifCardBySid(cardSid).getData(); |
|
|
|
AppletVo appletVo = baseMapper.getGifCardBySid(cardSid); |
|
|
|
Date date =new Date(); |
|
|
|
SimpleDateFormat sdf1 =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
|
|
|
String nowDate =sdf1.format(date); |
|
|
|
// AppletVo vo = getGifCardBySid(cardSid).getData();
|
|
|
|
// LocalDate now = DateUtil.parse(sdf1.format(DateUtil.parse(appletVo.getStart()))).toSqlDate().toLocalDate();
|
|
|
|
LocalDate now = DateUtil.parse(nowDate).toSqlDate().toLocalDate(); |
|
|
|
LocalDate endD = DateUtil.parse(appletVo.getDateEnd()).toSqlDate().toLocalDate(); |
|
|
|
|
|
|
|
|
|
|
|
// LocalDate now = DateUtil.parse(vo.getStart()).toSqlDate().toLocalDate();
|
|
|
|
LocalDate now = DateUtil.parse(sdf1.format(new Date())).toSqlDate().toLocalDate(); |
|
|
|
LocalDate endD = DateUtil.parse(vo.getEnd()).toSqlDate().toLocalDate(); |
|
|
|
System.out.println("-------------------------------------------------------"+vo.getEnd()); |
|
|
|
List<String> weekMap = new ArrayList<>(); |
|
|
|
// 第一个星期六
|
|
|
|
// LocalDate saturday = now.with(firstInMonth(DayOfWeek.SATURDAY));
|
|
|
@ -607,7 +609,6 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp |
|
|
|
} |
|
|
|
// 迭代一个星期
|
|
|
|
saturday = saturday.plus(Period.ofDays(7)); |
|
|
|
System.out.println(saturday.compareTo(endD)); |
|
|
|
} while (saturday.compareTo(endD) < 1); |
|
|
|
// 第一个星期天
|
|
|
|
LocalDate sunday = now.with(DayOfWeek.SUNDAY); |
|
|
@ -619,7 +620,6 @@ public class LpkGiftCardService extends MybatisBaseService<LpkGiftCardMapper, Lp |
|
|
|
} |
|
|
|
// 迭代一个星期
|
|
|
|
sunday = sunday.plus(Period.ofDays(7)); |
|
|
|
System.out.println(sunday.compareTo(endD)); |
|
|
|
} while (sunday.compareTo(endD) < 1); |
|
|
|
String nextYear = DateUtil.offsetMonth(new Date(), 12).toString(); |
|
|
|
int y = DateUtil.year(DateUtil.parse(nextYear)); |
|
|
|