فهرست منبع

返回数据加入时间

yumeng 5 سال پیش
والد
کامیت
3dc1911e51

+ 4 - 2
module-report/src/main/java/cn/com/ctop/bytedance/service/impl/BytedanceReportServiceImpl.java

@@ -211,9 +211,11 @@ public class BytedanceReportServiceImpl implements IBytedanceReportService {
                 if (maxHour == 0 || Check.isNull(maxHour)) {
                     return accountJson;
                 }
-                accountJson = reportMapper.selectSumDayHourlyByHourAndDate(nowDate, String.valueOf(maxHour - 1));
+                String maxHourStr = String.valueOf(maxHour - 1);
+                accountJson = reportMapper.selectSumDayHourlyByHourAndDate(nowDate, maxHourStr);
+                accountJson.put("maxHour", maxHourStr);
                 if (!Check.isNull(accountJson)) {
-                    JSONObject yesterdayJson = reportMapper.selectSumDayHourlyByHourAndDate(anotherDay, String.valueOf(maxHour - 1));
+                    JSONObject yesterdayJson = reportMapper.selectSumDayHourlyByHourAndDate(anotherDay, maxHourStr);
                     if (!Check.isNull(yesterdayJson)) {
                         BigDecimal cost = accountJson.getBigDecimal("cost"); // 今日消耗
                         BigDecimal yesterdayCost = yesterdayJson.getBigDecimal("cost");// 昨日消耗