Browse Source

小更新

wangb 1 year ago
parent
commit
b55a9ec453

+ 4 - 1
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/config/MybatisPlusConfig.java

@@ -4,6 +4,7 @@ package com.gyee.runeconomy.config;
 import cn.hutool.core.date.DatePattern;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.IdUtil;
+import com.baomidou.mybatisplus.annotation.DbType;
 import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
 import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor;
 import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
@@ -26,7 +27,9 @@ public class MybatisPlusConfig {
      */
     @Bean
     public PaginationInterceptor paginationInterceptor() {
-        return new PaginationInterceptor();
+        PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
+        paginationInterceptor.setDbType(DbType.POSTGRE_SQL);
+        return paginationInterceptor;
     }
 
     /**

+ 2 - 0
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/init/CacheContext.java

@@ -194,6 +194,7 @@ public class CacheContext implements CommandLineRunner {
 
     public static List<ProBasicPowerstationPoint> proBasicPowerstationPoint;
     public static List<ProBasicEquipmentBranchPoint> proBasicEquipmentBranchPointList;
+    public static Map<String, ProBasicBranch> bnlsMap;
 
     @Override
     public void run(String... args) throws Exception {
@@ -216,6 +217,7 @@ public class CacheContext implements CommandLineRunner {
         //Map<String, Object> pbotidMap = redisService.batchGetKeys(pbotids);
 
         bnls = proBasicBranchService.list();
+        bnlsMap = bnls.stream().collect(Collectors.toMap(ProBasicBranch::getId, Function.identity()));
         //List<String> bnlids = bnls.stream().map(bnl -> bnl.getId()).collect(Collectors.toList());
         //Map<String, Object> objectMap = redisService.batchGetKeys(bnlids);
         /*bnls.stream().forEach(bn -> {

+ 1 - 1
web/runeconomy-jjyx/src/main/java/com/gyee/runeconomy/service/goodness/WindturbinegoodnessService.java

@@ -1249,7 +1249,7 @@ public class WindturbinegoodnessService {
 
     public Page<ProEconAnalysisClean> cleanAnalysis(String companys, String wpid, String wtid, String date, Long pageSize, Long pageNum, String target, String sort) throws ParseException {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
-        Page<ProEconAnalysisClean> page = new Page<>(pageSize, pageNum);
+        Page<ProEconAnalysisClean> page = new Page<>(pageNum, pageSize);
         QueryWrapper<ProEconAnalysisClean> peac = new QueryWrapper();
         peac.eq("company_id", companys)
                 .eq("windpowerstation_id", wpid)