Browse Source

优化循环

release_toaliyun_real
Burce 6 years ago
parent
commit
29f39b5c2b
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      mallinkSchedule/src/main/java/com/iformall/schedule/CouponSendSchedule.java

+ 3
- 3
mallinkSchedule/src/main/java/com/iformall/schedule/CouponSendSchedule.java View File

@@ -170,11 +170,11 @@ public class CouponSendSchedule {
return count; return count;
}).reduce(Integer::sum).get(); }).reduce(Integer::sum).get();


int remainSend = (int) (sendCount - sentCount);
logger.info("定时发券:给[" + cu.getNickName() + logger.info("定时发券:给[" + cu.getNickName() +
"]总共已发送券" + sentCount + "张,还需发" + (sendCount - sentCount) + "张");
"]总共已发送券" + sentCount + "张,还需发" + remainSend + "张");


for (int count = 0; count < sendCount - sentCount; count++) {
for (int count = 0; count < remainSend; count++) {
boolean sent = false; boolean sent = false;
for (int couponIndex = 0; couponIndex < couponSendList.size(); couponIndex++) { for (int couponIndex = 0; couponIndex < couponSendList.size(); couponIndex++) {
WxCouponSendVo cs = couponSendList.get(couponIndex); WxCouponSendVo cs = couponSendList.get(couponIndex);


Loading…
Cancel
Save