소스 검색

优化报表查询

java110 5 년 전
부모
커밋
d80242f5c1

+ 2 - 0
java110-interface/src/main/java/com/java110/intf/report/IReportFeeMonthStatisticsInnerServiceSMO.java

@@ -57,6 +57,7 @@ public interface IReportFeeMonthStatisticsInnerServiceSMO {
      * @param reportFeeMonthStatisticsDto
      * @return
      */
+    @RequestMapping(value = "/queryReportFeeSummaryCount", method = RequestMethod.POST)
     int queryReportFeeSummaryCount(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
 
     /**
@@ -64,5 +65,6 @@ public interface IReportFeeMonthStatisticsInnerServiceSMO {
      * @param reportFeeMonthStatisticsDto
      * @return
      */
+    @RequestMapping(value = "/queryReportFeeSummary", method = RequestMethod.POST)
     List<ReportFeeMonthStatisticsDto> queryReportFeeSummary(@RequestBody ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto);
 }

+ 2 - 2
service-report/src/main/java/com/java110/report/bmo/reportFeeMonthStatistics/impl/GetReportFeeMonthStatisticsBMOImpl.java

@@ -48,11 +48,11 @@ public class GetReportFeeMonthStatisticsBMOImpl implements IGetReportFeeMonthSta
 
     @Override
     public ResponseEntity<String> queryReportFeeSummary(ReportFeeMonthStatisticsDto reportFeeMonthStatisticsDto) {
-        int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFeeMonthStatisticssCount(reportFeeMonthStatisticsDto);
+        int count = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFeeSummaryCount(reportFeeMonthStatisticsDto);
 
         List<ReportFeeMonthStatisticsDto> reportFeeMonthStatisticsDtos = null;
         if (count > 0) {
-            reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFeeMonthStatisticss(reportFeeMonthStatisticsDto);
+            reportFeeMonthStatisticsDtos = reportFeeMonthStatisticsInnerServiceSMOImpl.queryReportFeeSummary(reportFeeMonthStatisticsDto);
         } else {
             reportFeeMonthStatisticsDtos = new ArrayList<>();
         }

+ 11 - 0
service-report/src/main/resources/dataSource.yml

@@ -11,6 +11,17 @@ dataSources:
     filters: stat,wall,log4j
     poolPreparedStatements: true
 
+shardingRule:
+  tables:
+    business_xxx:
+      actualDataNodes: ds0.business_community
+      databaseStrategy:
+        inline:
+          shardingColumn: community_id
+          algorithmExpression: ds${Long.parseLong(community_id) % 2}
+
+  bindingTables:
+    - business_xxx
 
   defaultDataSourceName: ds0
   defaultDatabaseStrategy: