Commit 24a408dd authored by libin's avatar libin

Merge branch 'order_received_statistics' into dev

parents 55ed935d 63180107
......@@ -96,7 +96,7 @@ public enum StatisticsStatusEnum {
x.getPayWay() == null ? NO_PAY_WAY : x.getPayWay()
, x.getHasPay()));
stisticsActiveState.add(x.getStateGroup());
}).collect(Collectors.partitioningBy(x -> Objects.nonNull(x.getPayWay()), Collectors.groupingBy(OrderDTO::getStateGroup, Collectors.toList())));
}).collect(Collectors.partitioningBy(x -> Objects.equals(x.getHasPay(),1), Collectors.groupingBy(OrderDTO::getStateGroup, Collectors.toList())));
return stateGroupMap == null ? Collections.EMPTY_MAP : stateGroupMap;
}
......
......@@ -127,14 +127,13 @@ public class ServiceTest {
public void testOrderReceivedStatisticsJobHandler(){
cn.hutool.core.date.DateTime dateTime = DateUtil.parse("2019-11-29", "yyyy-MM-dd");
// cn.hutool.core.date.DateTime offset = DateUtil.offset(dateTime, DateField.DAY_OF_MONTH, 1);
/* orderReceivedStatisticsJobHandler.execute("2019-11-29");*/
LocalDate startLocalDate = LocalDate.of(2019, 11, 30);
// orderReceivedStatisticsJobHandler.execute("2019-10-08");
LocalDate startLocalDate = LocalDate.of(2019, 10, 01);
LocalDate endLocalDate = LocalDate.of(2019,12,19);
while (startLocalDate.isBefore(endLocalDate)){
String dateStr = startLocalDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
startLocalDate = startLocalDate.plusDays(1);
orderReceivedStatisticsJobHandler.execute(dateStr);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment