1.删除发放权益时注释的代码
2.修改本周一和本周日的日期生成逻辑
Showing
2 changed files
with
7 additions
and
21 deletions
... | @@ -141,7 +141,6 @@ public class RightsOperationServiceImpl implements RightsOperationService { | ... | @@ -141,7 +141,6 @@ public class RightsOperationServiceImpl implements RightsOperationService { |
141 | this.grantPoint(tempPointsList); | 141 | this.grantPoint(tempPointsList); |
142 | log.info("发放积分结束 ==>> {}", tempPointsList); | 142 | log.info("发放积分结束 ==>> {}", tempPointsList); |
143 | } | 143 | } |
144 | // }); | ||
145 | 144 | ||
146 | List<TempExp> tempExpList = (List<TempExp>) tempRightsMap.get(RightType.EXP); | 145 | List<TempExp> tempExpList = (List<TempExp>) tempRightsMap.get(RightType.EXP); |
147 | if (!CollectionUtils.isEmpty(tempExpList)) { | 146 | if (!CollectionUtils.isEmpty(tempExpList)) { |
... | @@ -151,18 +150,6 @@ public class RightsOperationServiceImpl implements RightsOperationService { | ... | @@ -151,18 +150,6 @@ public class RightsOperationServiceImpl implements RightsOperationService { |
151 | log.info("发放成长值结束 ==>> "); | 150 | log.info("发放成长值结束 ==>> "); |
152 | } | 151 | } |
153 | 152 | ||
154 | // this.threadPoolTaskExecutor.submit(() -> { | ||
155 | /*List<TempCoupon> tempCouponList = (List<TempCoupon>) tempRightsMap.get(RightType.COUPON); | ||
156 | if (!CollectionUtils.isEmpty(tempCouponList)) { | ||
157 | // log.info("发放优惠券开始 ==>> [{}]", tempCouponList); | ||
158 | long l = System.currentTimeMillis(); | ||
159 | // 优惠券 | ||
160 | this.grantCoupon(tempCouponList); | ||
161 | long l2 = System.currentTimeMillis(); | ||
162 | log.info("发放优惠券结束,总耗时 ==>> {}", (l2 - l)); | ||
163 | }*/ | ||
164 | // }); | ||
165 | |||
166 | // 其他权益 | 153 | // 其他权益 |
167 | this.grantOtherRight(tempRightsMap); | 154 | this.grantOtherRight(tempRightsMap); |
168 | log.info("发放其他权益结束 ==>>" ); | 155 | log.info("发放其他权益结束 ==>>" ); | ... | ... |
1 | package com.topdraw.util; | 1 | package com.topdraw.util; |
2 | 2 | ||
3 | import java.text.SimpleDateFormat; | 3 | import java.text.SimpleDateFormat; |
4 | import java.time.Instant; | 4 | import java.time.*; |
5 | import java.time.LocalDate; | 5 | import java.time.temporal.TemporalAdjusters; |
6 | import java.time.LocalDateTime; | 6 | import java.time.temporal.TemporalUnit; |
7 | import java.time.ZoneId; | ||
8 | import java.util.Calendar; | 7 | import java.util.Calendar; |
9 | import java.util.Date; | 8 | import java.util.Date; |
10 | import java.util.TimeZone; | 9 | import java.util.TimeZone; |
... | @@ -180,9 +179,9 @@ public class DateUtil { | ... | @@ -180,9 +179,9 @@ public class DateUtil { |
180 | 179 | ||
181 | Calendar calendar1=Calendar.getInstance(); | 180 | Calendar calendar1=Calendar.getInstance(); |
182 | 181 | ||
183 | calendar1.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); | 182 | calendar1.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); |
184 | 183 | ||
185 | System.out.println("本周日: "+sdf.format(calendar1.getTime())); | 184 | System.out.println("本周一: "+sdf.format(calendar1.getTime())); |
186 | 185 | ||
187 | return sdf.format(calendar1.getTime()); | 186 | return sdf.format(calendar1.getTime()); |
188 | } | 187 | } |
... | @@ -192,8 +191,8 @@ public class DateUtil { | ... | @@ -192,8 +191,8 @@ public class DateUtil { |
192 | 191 | ||
193 | Calendar calendar1=Calendar.getInstance(); | 192 | Calendar calendar1=Calendar.getInstance(); |
194 | calendar1.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY); | 193 | calendar1.set(Calendar.DAY_OF_WEEK, Calendar.SATURDAY); |
195 | 194 | calendar1.add( Calendar.DAY_OF_MONTH,1); | |
196 | System.out.println("本周六: "+sdf.format(calendar1.getTime())); | 195 | System.out.println("本周日: "+sdf.format(calendar1.getTime())); |
197 | 196 | ||
198 | return sdf.format(calendar1.getTime()); | 197 | return sdf.format(calendar1.getTime()); |
199 | } | 198 | } | ... | ... |
-
Please register or sign in to post a comment