1
This commit is contained in:
+7
-2
@@ -885,7 +885,8 @@ public class OrderProfitAnalysisServiceImpl implements IOrderProfitAnalysisServi
|
||||
if ("week".equals(type)) {
|
||||
anchor = today.minusWeeks(1).with(DayOfWeek.MONDAY);
|
||||
} else if ("month".equals(type)) {
|
||||
anchor = today.minusMonths(1).withDayOfMonth(1);
|
||||
// 定时任务推上一完整月;页面不选月份时看本月,和订单列表里正在看的月对齐
|
||||
anchor = scheduled ? today.minusMonths(1).withDayOfMonth(1) : today;
|
||||
} else {
|
||||
// 日报:当天晚上推当天,页面预览默认也是今天
|
||||
anchor = today;
|
||||
@@ -931,8 +932,12 @@ public class OrderProfitAnalysisServiceImpl implements IOrderProfitAnalysisServi
|
||||
if (StringUtils.isEmpty(date)) {
|
||||
return null;
|
||||
}
|
||||
String raw = date.trim();
|
||||
try {
|
||||
return LocalDate.parse(date.trim(), DAY);
|
||||
if (raw.length() == 7) {
|
||||
return LocalDate.parse(raw + "-01", DAY);
|
||||
}
|
||||
return LocalDate.parse(raw, DAY);
|
||||
} catch (Exception e) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user