Showing
1 changed file
with
10 additions
and
8 deletions
@@ -234,7 +234,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport | @@ -234,7 +234,7 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport | ||
234 | private String IS_NEED_SIGN_UP = "union.need.signup.switch"; | 234 | private String IS_NEED_SIGN_UP = "union.need.signup.switch"; |
235 | private String RANKLIST_FROM_DATE = "union.rank.from"; | 235 | private String RANKLIST_FROM_DATE = "union.rank.from"; |
236 | 236 | ||
237 | - private static final int SETTLEMENT_ORDER_SPLIT_NUM=800; | 237 | + private static final int SETTLEMENT_ORDER_SPLIT_NUM=16; |
238 | 238 | ||
239 | 239 | ||
240 | 240 | ||
@@ -3765,13 +3765,12 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport | @@ -3765,13 +3765,12 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport | ||
3765 | return -1; | 3765 | return -1; |
3766 | } | 3766 | } |
3767 | int count = unionShareOrdersMapper.selectOrderNumByCondition(settlementCode); | 3767 | int count = unionShareOrdersMapper.selectOrderNumByCondition(settlementCode); |
3768 | - if (count < 1) { | ||
3769 | - return -2; | ||
3770 | - } | ||
3771 | - List<UnionShareOrdersBo> orderList = new ArrayList<>();//该提现对应的订单 | ||
3772 | int size = SETTLEMENT_ORDER_SPLIT_NUM; | 3768 | int size = SETTLEMENT_ORDER_SPLIT_NUM; |
3773 | - int page = count % size > 0 ? (count / size) + 1 : count / size; | ||
3774 | boolean isFirst = true; | 3769 | boolean isFirst = true; |
3770 | + if (count > 0 ) { | ||
3771 | + List<UnionShareOrdersBo> orderList = new ArrayList<>();//该提现对应的订单 | ||
3772 | + int page = count % size > 0 ? (count / size) + 1 : count / size; | ||
3773 | + | ||
3775 | for (int i = 0; i < page; i++) { | 3774 | for (int i = 0; i < page; i++) { |
3776 | int offset = i * size ; | 3775 | int offset = i * size ; |
3777 | List<UnionShareOrders> periodOrders = unionShareOrdersMapper.selectOrderByCondition(settlementCode, offset, size); | 3776 | List<UnionShareOrders> periodOrders = unionShareOrdersMapper.selectOrderByCondition(settlementCode, offset, size); |
@@ -3790,12 +3789,15 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport | @@ -3790,12 +3789,15 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport | ||
3790 | isFirst = false; | 3789 | isFirst = false; |
3791 | orderList.clear(); | 3790 | orderList.clear(); |
3792 | } | 3791 | } |
3792 | + } | ||
3793 | + | ||
3793 | //查询活动额外返的返利单 | 3794 | //查询活动额外返的返利单 |
3794 | List<Integer> ids = unionShareOrdersMapper.selectIdForActivity(settlementCode); | 3795 | List<Integer> ids = unionShareOrdersMapper.selectIdForActivity(settlementCode); |
3795 | List<UnionShareOrdersActivityBo> activityBos = new ArrayList<>(); | 3796 | List<UnionShareOrdersActivityBo> activityBos = new ArrayList<>(); |
3796 | if(CollectionUtils.isNotEmpty(ids)){ | 3797 | if(CollectionUtils.isNotEmpty(ids)){ |
3797 | - page = count % size > 0 ? (count / size) + 1 : count / size; | ||
3798 | - for (int i = 0; i < page; i++) { | 3798 | + count = ids.size(); |
3799 | + int pageA = count % size > 0 ? (count / size) + 1 : count / size; | ||
3800 | + for (int i = 0; i < pageA; i++) { | ||
3799 | int startIndex = i * size ; | 3801 | int startIndex = i * size ; |
3800 | int endIndex=startIndex+size-1; | 3802 | int endIndex=startIndex+size-1; |
3801 | List<UnionShareOrdersActivityLogs> activities = unionShareOrdersActivityLogsMapper.selectByOrderIds(ids.subList(startIndex,endIndex<count?endIndex:count-1)); | 3803 | List<UnionShareOrdersActivityLogs> activities = unionShareOrdersActivityLogsMapper.selectByOrderIds(ids.subList(startIndex,endIndex<count?endIndex:count-1)); |
-
Please register or login to post a comment