Browse Source

Merge branch 'V1.1.5_v2'

syh 4 years ago
parent
commit
52f2a406d3

+ 2 - 2
jeecg-boot-module-system/src/main/resources/application-test.yml

@@ -1,5 +1,5 @@
 server:
-  port: 8804
+  port: 8806
   servlet:
     context-path: /jeecg-boot
     compression:
@@ -97,7 +97,7 @@ spring:
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
       datasource:
         master:
-          url: jdbc:mysql://139.186.151.174:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true
+          url: jdbc:mysql://139.186.165.84:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true
           username: hcst
           password: hcst@2020
           driver-class-name: com.mysql.jdbc.Driver

+ 7 - 11
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/AccountReportServiceImpl.java

@@ -6,15 +6,12 @@ import cn.com.ctop.kuaishou.modules.report.service.IAccountReportService;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import org.jeecg.common.util.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import javax.annotation.Resource;
 import java.math.BigDecimal;
 import java.math.RoundingMode;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * @author yumeng
@@ -22,7 +19,7 @@ import java.util.Map;
  */
 @Service
 public class AccountReportServiceImpl implements IAccountReportService {
-    @Autowired
+    @Resource
     private AccountReportMapper accountReportMapper;
 
     /**
@@ -51,10 +48,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
             String anotherDay = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
             if (type == 1) {
                 // 今日汇总
-                Integer maxHour = accountReportMapper.selectMaxHourByDate(nowDate);
-                if (Check.isNull(maxHour) || maxHour == 0) {
-                    return null;
-                }
+                Calendar calendar = Calendar.getInstance();
+                int maxHour = calendar.get(Calendar.HOUR_OF_DAY);
                 String maxHourStr = String.valueOf(maxHour - 1);
                 // 今日 小时汇总数据
                 accountJson = accountReportMapper.selectSumDayHourlyByHourAndDate(nowDate, maxHourStr, accountIds);
@@ -268,7 +263,8 @@ public class AccountReportServiceImpl implements IAccountReportService {
             if (type == 1) {
                 // 今日汇总
                 if (Check.isNull(statHour)) {
-                    Integer maxHour = accountReportMapper.selectMaxHourByDate(nowDate);
+                    Calendar calendar = Calendar.getInstance();
+                    int maxHour = calendar.get(Calendar.HOUR_OF_DAY);
                     hour = maxHour - 1;
                 } else {
                     hour = statHour;