Commit 260caab0 260caab0edb0cc32974f519b77e8506119796749 by xianghan

1.删除发放权益时注释的代码

2.修改本周一和本周日的日期生成逻辑
1 parent 38088726
......@@ -141,7 +141,6 @@ public class RightsOperationServiceImpl implements RightsOperationService {
this.grantPoint(tempPointsList);
log.info("发放积分结束 ==>> {}", tempPointsList);
}
// });
List<TempExp> tempExpList = (List<TempExp>) tempRightsMap.get(RightType.EXP);
if (!CollectionUtils.isEmpty(tempExpList)) {
......@@ -151,18 +150,6 @@ public class RightsOperationServiceImpl implements RightsOperationService {
log.info("发放成长值结束 ==>> ");
}
// this.threadPoolTaskExecutor.submit(() -> {
/*List<TempCoupon> tempCouponList = (List<TempCoupon>) tempRightsMap.get(RightType.COUPON);
if (!CollectionUtils.isEmpty(tempCouponList)) {
// log.info("发放优惠券开始 ==>> [{}]", tempCouponList);
long l = System.currentTimeMillis();
// 优惠券
this.grantCoupon(tempCouponList);
long l2 = System.currentTimeMillis();
log.info("发放优惠券结束,总耗时 ==>> {}", (l2 - l));
}*/
// });
// 其他权益
this.grantOtherRight(tempRightsMap);
log.info("发放其他权益结束 ==>>" );
......
package com.topdraw.util;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.*;
import java.time.temporal.TemporalAdjusters;
import java.time.temporal.TemporalUnit;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
......@@ -180,9 +179,9 @@ public class DateUtil {
Calendar calendar1=Calendar.getInstance();
calendar1.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
calendar1.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
System.out.println("本周: "+sdf.format(calendar1.getTime()));
System.out.println("本周: "+sdf.format(calendar1.getTime()));
return sdf.format(calendar1.getTime());
}
......@@ -192,8 +191,8 @@ public class DateUtil {
Calendar calendar1=Calendar.getInstance();
calendar1.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY);
System.out.println("本周: "+sdf.format(calendar1.getTime()));
calendar1.add( Calendar.DAY_OF_MONTH,1);
System.out.println("本周: "+sdf.format(calendar1.getTime()));
return sdf.format(calendar1.getTime());
}
......