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