Jelajahi Sumber

Merge branch 'master' into lcy

# Conflicts:
#	benyun-core/src/main/java/com/ruoyi/benyun/entity/Brand.java
云殇忆 1 tahun lalu
induk
melakukan
cdc6fe2fcc
36 mengubah file dengan 865 tambahan dan 224 penghapusan
  1. 1 1
      .run/ruoyi-monitor-admin.run.xml
  2. 1 1
      .run/ruoyi-xxl-job-admin.run.xml
  3. 7 2
      benyun-core/pom.xml
  4. 2 0
      benyun-core/src/main/java/com/ruoyi/benyun/BenyunCoreApplication.java
  5. 41 14
      benyun-core/src/main/java/com/ruoyi/benyun/config/QuartzConfig.java
  6. 1 1
      benyun-core/src/main/java/com/ruoyi/benyun/config/RedisConfiguration.java
  7. 16 22
      benyun-core/src/main/java/com/ruoyi/benyun/entity/Brand.java
  8. 3 0
      benyun-core/src/main/java/com/ruoyi/benyun/init/BenyunCoreInit.java
  9. 90 0
      benyun-core/src/main/java/com/ruoyi/benyun/job/ClearJob.java
  10. 2 1
      benyun-core/src/main/java/com/ruoyi/benyun/job/WriteRedisJob.java
  11. 92 90
      benyun-core/src/main/java/com/ruoyi/benyun/utils/WdRedisStoreage.java
  12. 21 12
      benyun-core/src/main/resources/application-prod.yaml
  13. 194 0
      benyun-core/src/main/resources/application-test.yaml
  14. 1 1
      benyun-core/src/main/resources/application.yaml
  15. 89 10
      benyun-core/src/test/java/com/ruoyi/benyun/BenyunCoreApplicationTests.java
  16. 12 1
      pom.xml
  17. 4 4
      ruoyi-admin/Dockerfile
  18. 24 26
      ruoyi-admin/src/main/resources/application-prod.yml
  19. 210 0
      ruoyi-admin/src/main/resources/application-test.yml
  20. 0 2
      ruoyi-demo/src/main/java/com/ruoyi/demo/config/RedisConfiguration.java
  21. 4 4
      ruoyi-demo/src/main/java/com/ruoyi/demo/controller/ChannelAnalyseController.java
  22. 3 0
      ruoyi-demo/src/main/java/com/ruoyi/demo/init/BenyunCoreInit.java
  23. 2 0
      ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/BusinessOpportunitiesServiceImpl.java
  24. 2 0
      ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/CategoryServiceImpl.java
  25. 22 26
      ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/ChannelAnalyseServiceImpl.java
  26. 2 1
      ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/ChannelMapServiceImpl.java
  27. 2 0
      ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/CommonServiceImpl.java
  28. 2 0
      ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DatabackServiceImpl.java
  29. 2 0
      ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/TopologicalCommonServiceImpl.java
  30. 2 0
      ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/TopologicalEnterpriseWdServiceImpl.java
  31. 2 0
      ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/TopologicalHouseServiceWdImpl.java
  32. 2 0
      ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/TopologicalStoreWdServiceImpl.java
  33. 2 0
      ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/WdInfoServiceImpl.java
  34. 0 1
      ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/package-info.java
  35. 1 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java
  36. 4 4
      ruoyi-ui/vue.config.js

+ 1 - 1
.run/ruoyi-monitor-admin.run.xml

@@ -1,5 +1,5 @@
 <component name="ProjectRunConfigurationManager">
-  <configuration default="false" name="ruoyi-monitor-admin" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
+  <configuration default="false" name="ruoyi-monitor-admin" type="docker-deploy" factoryName="dockerfile">
     <deployment type="dockerfile">
       <settings>
         <option name="imageTag" value="ruoyi/ruoyi-monitor-admin:4.8.0" />

+ 1 - 1
.run/ruoyi-xxl-job-admin.run.xml

@@ -1,5 +1,5 @@
 <component name="ProjectRunConfigurationManager">
-  <configuration default="false" name="ruoyi-xxl-job-admin" type="docker-deploy" factoryName="dockerfile" server-name="Docker">
+  <configuration default="false" name="ruoyi-xxl-job-admin" type="docker-deploy" factoryName="dockerfile">
     <deployment type="dockerfile">
       <settings>
         <option name="imageTag" value="ruoyi/ruoyi-xxl-job-admin:4.8.0" />

+ 7 - 2
benyun-core/pom.xml

@@ -73,9 +73,14 @@
             <scope>test</scope>
         </dependency>
 
+<!--        <dependency>-->
+<!--            <groupId>redis.clients</groupId>-->
+<!--            <artifactId>jedis</artifactId>-->
+<!--        </dependency>-->
+
         <dependency>
-            <groupId>redis.clients</groupId>
-            <artifactId>jedis</artifactId>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
         </dependency>
 
         <dependency>

+ 2 - 0
benyun-core/src/main/java/com/ruoyi/benyun/BenyunCoreApplication.java

@@ -13,4 +13,6 @@ public class BenyunCoreApplication {
         SpringApplication.run(BenyunCoreApplication.class, args);
     }
 
+
+
 }

+ 41 - 14
benyun-core/src/main/java/com/ruoyi/benyun/config/QuartzConfig.java

@@ -2,6 +2,7 @@ package com.ruoyi.benyun.config;
 
 
 import com.ruoyi.benyun.job.AnalyseJob;
+import com.ruoyi.benyun.job.BrandStatsiticsJob;
 import com.ruoyi.benyun.job.WriteRedisJob;
 import lombok.extern.slf4j.Slf4j;
 import org.quartz.*;
@@ -32,7 +33,7 @@ public class QuartzConfig {
     @Bean
     public Trigger AnalyseTrigger() {
         //定义Cron表达式
-        CronScheduleBuilder cron = CronScheduleBuilder.cronSchedule("0 0 0 18 10 ? ");
+        CronScheduleBuilder cron = CronScheduleBuilder.cronSchedule("0 0 0 1/15 * ? ");
         cron.inTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
 
         return TriggerBuilder
@@ -55,18 +56,44 @@ public class QuartzConfig {
 
 
 
-//    @Bean
-//    public Trigger WriteRedisTrigger(){
-//        //定义Cron表达式
-//        CronScheduleBuilder cron  = CronScheduleBuilder.cronSchedule("0 0 0 18 10 ? ");
-//        cron.inTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
-//
-//        return TriggerBuilder
-//            .newTrigger()
-//            .forJob(WriteRedisJobDetail()) //绑定要运行的JobDetail对象,这是得到的是Spring容器里的JobDetail
-//            .withIdentity("writeRedisTrigger") //给当前Trigger对象起名字,名字任意
-//            .withSchedule(cron) //绑定cron表达式
-//            .build();
-//    }
+    @Bean
+    public Trigger WriteRedisTrigger(){
+        //定义Cron表达式
+        CronScheduleBuilder cron  = CronScheduleBuilder.cronSchedule("0 0 0 22 11 ? *");
+
+        cron.inTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
+
+        return TriggerBuilder
+            .newTrigger()
+            .forJob(WriteRedisJobDetail()) //绑定要运行的JobDetail对象,这是得到的是Spring容器里的JobDetail
+            .withIdentity("writeRedisTrigger") //给当前Trigger对象起名字,名字任意
+            .withSchedule(cron) //绑定cron表达式
+            .build();
+    }
+
+    @Bean
+    public JobDetail BrandStatsiticsJobDetail() {
+        log.info("BrandStatsiticsJobDetail");
+
+        return JobBuilder.newJob(BrandStatsiticsJob.class) //newJob方法就是在绑定要运行的Job接口实现。
+            .withIdentity("BrandStatsiticsJobDetail") //给当前JobDetail对象取名字
+            .storeDurably() //及时没有触发器绑定当前JobDetail对象,也不会被删除
+            .build();
+    }
+
+    //触发器声明,设置job的运行时机,并放入Spring容器中
+    @Bean
+    public Trigger BrandStatsiticsTrigger() {
+        //定义Cron表达式
+        CronScheduleBuilder cron = CronScheduleBuilder.cronSchedule("0 0 18 13 11 ? ");
+        cron.inTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
+
+        return TriggerBuilder
+            .newTrigger()
+            .forJob(BrandStatsiticsJobDetail()) //绑定要运行的JobDetail对象,这是得到的是Spring容器里的JobDetail
+            .withIdentity("BrandStatsiticsTrigger") //给当前Trigger对象起名字,名字任意
+            .withSchedule(cron) //绑定cron表达式
+            .build();
+    }
 
 }

+ 1 - 1
benyun-core/src/main/java/com/ruoyi/benyun/config/RedisConfiguration.java

@@ -32,6 +32,7 @@ public class RedisConfiguration {
         RedisTemplate<Object,Object>  redisTemplate = new RedisTemplate();
 
         redisTemplate.setConnectionFactory(redisConnectionFactory);
+
         // 设置Redis的key使用字符串序列化器,解决key可读性差的问题。
         redisTemplate.setKeySerializer(new StringRedisSerializer());
         redisTemplate.setHashKeySerializer(new StringRedisSerializer());
@@ -43,7 +44,6 @@ public class RedisConfiguration {
         redisTemplate.setValueSerializer(valueSerializer());
         redisTemplate.setHashValueSerializer(valueSerializer());
 
-        redisTemplate.setConnectionFactory(redisConnectionFactory);
         return redisTemplate;
     }
 

+ 16 - 22
benyun-core/src/main/java/com/ruoyi/benyun/entity/Brand.java

@@ -15,66 +15,60 @@ import java.time.LocalDateTime;
 @Data
 @TableName("ddt_brand")
 public class Brand {
-    @TableField("brand_id")
+    @TableId("brand_id")
     private String brandId;
-
     @TableField("brand_img")
     private String brandImg;
-
     @TableField("brand_name")
     private String brandName;
-
     @TableField("industry_code")
     private String industryCode;
-
     @TableField("enterprise_usci")
     private String enterpriseUsci;
-
     @TableField("per_capita_consumption")
-    private BigDecimal perCapitaConsumption;
-
+    private Float perCapitaConsumption;
     @TableField("comment_count")
-    private Integer commentCount;
-
+    private Long commentCount;
     @TableField("score")
-    private BigDecimal score;
-
+    private Float score;
     @TableField("menu_info")
     private String menuInfo;
-
     @TableField("index_score")
-    private BigDecimal indexScore;
-
+    private Float indexScore;
+    @TableField("contact")
+    private String contact;
+    @TableField("telephone")
+    private String telephone;
     @TableField("create_date")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonSerialize(using = LocalDateTimeSerializer.class)
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)
     private LocalDateTime createDate;
-
     @TableField("audit")
-    private Integer audit;
-
+    private Long audit;
+    @TableField("collect_user_id")
+    private String collectUserId;
     @TableField("collect_person")
     private String collectPerson;
-
     @TableField("collect_time")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonSerialize(using = LocalDateTimeSerializer.class)
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)
     private LocalDateTime collectTime;
-
     @TableField("enter_time")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonSerialize(using = LocalDateTimeSerializer.class)
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)
     private LocalDateTime enterTime;
-
     @TableField("hash")
     private String hash;
-
     @TableField("update_time")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonSerialize(using = LocalDateTimeSerializer.class)
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)
     private LocalDateTime updateTime;
+
+    @TableLogic
+    @TableField("show_delete")
+    private int showDelete;
 }

+ 3 - 0
benyun-core/src/main/java/com/ruoyi/benyun/init/BenyunCoreInit.java

@@ -1,6 +1,7 @@
 package com.ruoyi.benyun.init;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.ruoyi.benyun.config.RedisConfiguration;
 import com.ruoyi.benyun.constant.RedisInitContant;
 import com.ruoyi.benyun.entity.AddrCategory;
 import com.ruoyi.benyun.mapper.AddrCategoryDao;
@@ -11,6 +12,7 @@ import com.ruoyi.benyun.entity.TypeBy;
 import com.ruoyi.benyun.utils.InitMapUtil;
 import com.ruoyi.common.core.domain.R;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.data.redis.core.BoundHashOperations;
@@ -24,6 +26,7 @@ import java.util.Set;
 import java.util.concurrent.*;
 
 @Configuration
+//@AutoConfigureAfter(RedisConfiguration.class)
 public class BenyunCoreInit {
     @Autowired
     AddrCategoryDao addrCategoryDao;

+ 90 - 0
benyun-core/src/main/java/com/ruoyi/benyun/job/ClearJob.java

@@ -0,0 +1,90 @@
+package com.ruoyi.benyun.job;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.ruoyi.benyun.entity.Brand;
+import com.ruoyi.benyun.entity.StoreWd;
+import com.ruoyi.benyun.mapper.BrandMapper;
+import com.ruoyi.benyun.mapper.StoreWdDao;
+import com.ruoyi.benyun.mapper.WdInfoMapper;
+import org.quartz.Job;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Component
+public class ClearJob implements Job {
+    @Autowired
+    BrandMapper brandMapper;
+
+    @Autowired
+    StoreWdDao storeWdDao;
+
+    @Value("${clear.BrandNames}")
+    String[] brandNames;
+
+    @Override
+    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
+        ArrayList<String> moreBrandName = new ArrayList<>();
+        ArrayList<String> existBrandName = new ArrayList<>();
+        for (String brandName : brandNames) {
+            //1.找到主品牌
+            QueryWrapper<Brand> queryWrapper = new QueryWrapper<>();
+            queryWrapper.select("brand_id","brand_name");
+            queryWrapper.eq("brand_name",brandName);
+            try {
+                Brand brand = brandMapper.selectOne(queryWrapper);
+                if (brand == null){
+                    existBrandName.add(brandName);
+                    continue;
+                }
+
+
+                //2.找到其他类似的品牌名
+                QueryWrapper<Brand> queryWrapper1 = new QueryWrapper<>();
+                queryWrapper1.select("brand_id","brand_name");
+                queryWrapper1.like("brand_name",brandName);
+
+                queryWrapper1.and(brandQueryWrapper -> {
+                    brandQueryWrapper.ne("brand_id",brand.getBrandId());
+                });
+                List<Brand> brands = brandMapper.selectList(queryWrapper1);
+
+                //3.修改对应的品牌绑定
+                List<Object> collect = brands.stream().map(item -> {
+                    return item.getBrandId();
+                }).collect(Collectors.toList());
+                UpdateWrapper<StoreWd> updateWrapper = new UpdateWrapper<>();
+                updateWrapper.set("brand_id",brand.getBrandId());
+                updateWrapper.set("brand_name",brand.getBrandName());
+                updateWrapper.in("brand_id",collect);
+                storeWdDao.update(null,updateWrapper);
+
+                //4.修改完毕后,删除对应的品牌信息
+                QueryWrapper<Brand> queryWrapper2 = new QueryWrapper<>();
+                queryWrapper2.in("brand_id",collect);
+                brandMapper.delete(queryWrapper2);
+            }catch (Exception exception){
+                exception.printStackTrace();
+                moreBrandName.add(brandName);
+            }
+        }
+
+        System.out.println("不存在品牌:");
+        for (String s : existBrandName) {
+            System.out.println(s);
+        }
+
+        System.out.println("出错品牌:");
+        for (String s : moreBrandName) {
+            System.out.println(s);
+        }
+    }
+}

+ 2 - 1
benyun-core/src/main/java/com/ruoyi/benyun/job/WriteRedisJob.java

@@ -26,7 +26,8 @@ public class WriteRedisJob implements Job {
     @Override
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
         LocalDateTime now = LocalDateTime.now(ZoneId.of("Asia/Shanghai"));
-        LocalDateTime localDateTime = now.plusDays(-1);
+        //LocalDateTime localDateTime = now.plusDays(-1);
+        LocalDateTime localDateTime = LocalDateTime.of(2023, 6, 1, 0,0);
         log.info("开始载入redis:" + localDateTime.toString());
         wdRedisStoreage.writeWdGeoRedis1(localDateTime.toString());
     }

+ 92 - 90
benyun-core/src/main/java/com/ruoyi/benyun/utils/WdRedisStoreage.java

@@ -2,9 +2,9 @@ package com.ruoyi.benyun.utils;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.ruoyi.benyun.constant.RedisContant;
-import com.ruoyi.benyun.mapper.WdInfoDao;
-import com.ruoyi.benyun.service.WriteService;
 import com.ruoyi.benyun.entity.WdInfo;
+import com.ruoyi.benyun.mapper.WdInfoDao;
+//import com.ruoyi.benyun.service.WriteService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.data.geo.Distance;
@@ -15,9 +15,10 @@ import org.springframework.data.redis.connection.RedisGeoCommands;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Component;
 
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
 import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.ExecutionException;
 import java.util.concurrent.ExecutorService;
 import java.util.stream.Collectors;
 
@@ -36,8 +37,8 @@ public class WdRedisStoreage {
 
 
 
-    @Autowired
-    WriteService writeService;
+    //@Autowired
+    //WriteService writeService;
 
 
     /***
@@ -112,90 +113,91 @@ public class WdRedisStoreage {
         //给网点打标签并存入redis中
         //writeWdGeoRedis2();
     }
-
-    public void clearSql2(){
-        List<String> wdId = new ArrayList<>();
-        List<String> storeId = new ArrayList<>();
-        List<String> houseId = new ArrayList<>();
-        List<String> buildId = new ArrayList<>();
-        List<String> trafficId = new ArrayList<>();
-        List<String> enterpriseId = new ArrayList<>();
-        long start = System.currentTimeMillis();
-
-        try{
-            System.out.println("开始清理");
-
-            QueryWrapper<WdInfo> wdInfoOriginQueryWrapper = new QueryWrapper<>();
-            wdInfoOriginQueryWrapper.select("hash", "count(hash) as audit").groupBy("hash").having("count(hash) >= 2");
-            List<WdInfo> wdInfoOrigins = wdInfoDao.selectList(wdInfoOriginQueryWrapper);
-
-            HashMap<String, Integer> hashMap = new HashMap<>();
-            for (WdInfo wdInfo : wdInfoOrigins) {
-                hashMap.put(wdInfo.getHash(), wdInfo.getAudit());
-            }
-
-
-            HashMap<String,Integer> hashMap1 = new HashMap<>();
-            hashMap1.put("total",1);
-            CompletableFuture<Void> future = null;
-            for (String s : hashMap.keySet()) {
-                future = CompletableFuture.runAsync(()->{
-                    synchronized (this){
-                        if(hashMap1.get("total")%1000 == 0){
-                            writeService.clearSql2(wdId,storeId,houseId,buildId,trafficId,enterpriseId);
-                            wdId.clear();
-                            storeId.clear();
-                            houseId.clear();
-                            buildId.clear();
-                            trafficId.clear();
-                            enterpriseId.clear();
-                        }
-                    }
-
-                    QueryWrapper<WdInfo> queryWrapper = new QueryWrapper<>();
-                    queryWrapper.eq("hash",s);
-                    queryWrapper.orderByDesc("collect_time");
-                    queryWrapper.last("limit " + (hashMap.get(s) - 1));
-                    List<WdInfo> wdInfos = wdInfoDao.selectList(queryWrapper);
-                    for (WdInfo wdInfo : wdInfos) {
-                        wdId.add(wdInfo.getWdId());
-
-                        switch (wdInfo.getWdTypeCode()){
-                            case "1":
-                                storeId.add(wdInfo.getWdId());
-                                break;
-                            case "2":
-                                houseId.add(wdInfo.getWdId());
-                                break;
-                            case "3":
-                                buildId.add(wdInfo.getWdId());
-                                break;
-                            case "4":
-                                trafficId.add(wdInfo.getWdId());
-                                break;
-                            case "5":
-                                enterpriseId.add(wdInfo.getWdId());
-                                break;
-                            default:
-                                break;
-                        }
-                    }
-                    System.out.println("进度:"+wdInfoOrigins.size()+"/"+hashMap1.get("total"));
-                    hashMap1.put("total",hashMap1.get("total")+1);
-                },executorService);
-            }
-            future.get();
-        }catch (Exception e){
-            e.printStackTrace();
-        }finally {
-            //删除
-            writeService.clearSql2(wdId,storeId,houseId,buildId,trafficId,enterpriseId);
-            long end = System.currentTimeMillis();
-            System.out.println("完成清理 "+(end-start)/(1000*60));
-        }
-
-
-    }
+//
+//    public void clearSql2(){
+//        List<String> wdId = new ArrayList<>();
+//        List<String> storeId = new ArrayList<>();
+//        List<String> houseId = new ArrayList<>();
+//        List<String> buildId = new ArrayList<>();
+//        List<String> trafficId = new ArrayList<>();
+//        List<String> enterpriseId = new ArrayList<>();
+//        long start = System.currentTimeMillis();
+//
+//        try{
+//            System.out.println("开始清理");
+//
+//            QueryWrapper<WdInfo> wdInfoOriginQueryWrapper = new QueryWrapper<>();
+//            wdInfoOriginQueryWrapper.select("hash", "count(hash) as audit").groupBy("hash").having("count(hash) >= 2");
+//            List<WdInfo> wdInfoOrigins = wdInfoDao.selectList(wdInfoOriginQueryWrapper);
+//
+//            HashMap<String, Integer> hashMap = new HashMap<>();
+//            for (WdInfo wdInfo : wdInfoOrigins) {
+//                hashMap.put(wdInfo.getHash(), wdInfo.getAudit());
+//            }
+//
+//
+//            HashMap<String,Integer> hashMap1 = new HashMap<>();
+//            hashMap1.put("total",1);
+//            CompletableFuture<Void> future = null;
+//            for (String s : hashMap.keySet()) {
+//                FutureTask
+//                future = CompletableFuture.runAsync(()->{
+//                    synchronized (this){
+//                        if(hashMap1.get("total")%1000 == 0){
+//                            writeService.clearSql2(wdId,storeId,houseId,buildId,trafficId,enterpriseId);
+//                            wdId.clear();
+//                            storeId.clear();
+//                            houseId.clear();
+//                            buildId.clear();
+//                            trafficId.clear();
+//                            enterpriseId.clear();
+//                        }
+//                    }
+//
+//                    QueryWrapper<WdInfo> queryWrapper = new QueryWrapper<>();
+//                    queryWrapper.eq("hash",s);
+//                    queryWrapper.orderByDesc("collect_time");
+//                    queryWrapper.last("limit " + (hashMap.get(s) - 1));
+//                    List<WdInfo> wdInfos = wdInfoDao.selectList(queryWrapper);
+//                    for (WdInfo wdInfo : wdInfos) {
+//                        wdId.add(wdInfo.getWdId());
+//
+//                        switch (wdInfo.getWdTypeCode()){
+//                            case "1":
+//                                storeId.add(wdInfo.getWdId());
+//                                break;
+//                            case "2":
+//                                houseId.add(wdInfo.getWdId());
+//                                break;
+//                            case "3":
+//                                buildId.add(wdInfo.getWdId());
+//                                break;
+//                            case "4":
+//                                trafficId.add(wdInfo.getWdId());
+//                                break;
+//                            case "5":
+//                                enterpriseId.add(wdInfo.getWdId());
+//                                break;
+//                            default:
+//                                break;
+//                        }
+//                    }
+//                    System.out.println("进度:"+wdInfoOrigins.size()+"/"+hashMap1.get("total"));
+//                    hashMap1.put("total",hashMap1.get("total")+1);
+//                },executorService);
+//            }
+//            future.get();
+//        }catch (Exception e){
+//            e.printStackTrace();
+//        }finally {
+//            //删除
+//            writeService.clearSql2(wdId,storeId,houseId,buildId,trafficId,enterpriseId);
+//            long end = System.currentTimeMillis();
+//            System.out.println("完成清理 "+(end-start)/(1000*60));
+//        }
+//
+//
+//    }
 
     public void writeWdGeoRedis1(String time){
         //1.将网点坐标存入redis中

+ 21 - 12
benyun-core/src/main/resources/application-prod.yaml

@@ -49,17 +49,17 @@ spring:
           driverClassName: com.mysql.cj.jdbc.Driver
           # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
           # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
-          url: jdbc:mysql://192.168.2.64:3306/bailian-ai-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          url: jdbc:mysql://192.168.0.31:3306/benyun-bailian?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
           username: root
-          password: benyun
+          password: LongX@321
         # 从库数据源
         slave:
           lazy: true
           type: ${spring.datasource.type}
           driverClassName: com.mysql.cj.jdbc.Driver
-          url: jdbc:mysql://192.168.2.64:3306/bailian-ai-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          url: jdbc:mysql://192.168.0.31:3306/benyun-bailian?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
           username: root
-          password: benyun
+          password: LongX@321
       #        oracle:
       #          type: ${spring.datasource.type}
       #          driverClassName: oracle.jdbc.OracleDriver
@@ -156,14 +156,18 @@ spring:
   #      maxWait: 3   #连接池最大阻塞等待时间(使用负值表示没有限制)
   #      maxActive: 8 #连接池最大连接数(使用赋值表示没有限制)
   redis:
-    cluster:
-      # 集群节点
-      nodes: 192.168.2.99:7001,192.168.2.99:7002,192.168.2.99:7003,192.168.2.99:7004,192.168.2.99:7005,192.168.2.99:7006
-      # 最大重定向次数
-      max-redirects: 5
-    # 密码
-    database: 1
-    password: 123456
+    # 地址
+    host: 192.168.0.34
+    # 端口,默认为6379
+    port: 6379
+    # 数据库索引
+    database: 12
+    # 密码(如没有密码请注释掉)
+    password: lsf@12345
+    # 连接超时时间
+    timeout: 10s
+    # 是否开启ssl
+    ssl: false
     lettuce:
       pool:
         min-idle: 0
@@ -171,6 +175,8 @@ spring:
         max-wait: -1
         max-idle: 8
         enabled: true
+
+
 #mybatis-plus配置
 mybatis-plus:
   mapper-locations: classpath*:/*mapper/**/*.xml  #告诉mybatis数据库映射文件mapper.xml的位置
@@ -185,3 +191,6 @@ pagehelper:
   reasonable: true
   support-methods-arguments: true
   params: count=countSql
+
+clear:
+  BrandNames: 麦当劳,肯德基,益禾堂,华莱士,茶百道,书亦烧仙草,星巴克,三品王

+ 194 - 0
benyun-core/src/main/resources/application-test.yaml

@@ -0,0 +1,194 @@
+server:
+  port: 8009
+  servlet:
+    context-path: /bailianAi
+    encoding:
+      enabled: true
+      force: true
+      charset: utf-8
+--- # 数据源配置
+#spring:
+#  shardingsphere:
+#    datasource:
+#      names: ds1
+#      ds1:
+#        type: com.alibaba.druid.pool.DruidDataSource
+#        driver-class-name: com.mysql.cj.jdbc.Driver
+#        url: jdbc:mysql://localhost:3306/ddt?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
+#        username: root
+#        password: Aa@1230
+#    sharding:
+#      tables:
+#        bl_wd_topological:
+#          actual-data-nodes: ds1.bl_wd_topological_$->{1..2}
+#          key-generator:
+#            column: center_wd_id
+#            type: SNOWFLAKE
+#          table-strategy:
+#            standard:
+#              sharding-column: center_wd_id
+#              precise-algorithm-class-name: com.benyun.core.utils.sharding.ConsistenceHashAlgorithm
+spring:
+  main:
+    allow-bean-definition-overriding: true
+
+  datasource:
+    type: com.zaxxer.hikari.HikariDataSource
+    # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
+    dynamic:
+      # 性能分析插件(有性能损耗 不建议生产环境使用)
+      p6spy: false
+      # 设置默认的数据源或者数据源组,默认值即为 master
+      primary: master
+      # 严格模式 匹配不到数据源则报错
+      strict: true
+      datasource:
+        # 主库数据源
+        master:
+          type: ${spring.datasource.type}
+          driverClassName: com.mysql.cj.jdbc.Driver
+          # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
+          # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
+          url: jdbc:mysql://192.168.2.64:3306/bailian-ai-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          username: root
+          password: benyun
+        # 从库数据源
+        slave:
+          lazy: true
+          type: ${spring.datasource.type}
+          driverClassName: com.mysql.cj.jdbc.Driver
+          url: jdbc:mysql://192.168.2.64:3306/bailian-ai-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          username: root
+          password: benyun
+      #        oracle:
+      #          type: ${spring.datasource.type}
+      #          driverClassName: oracle.jdbc.OracleDriver
+      #          url: jdbc:oracle:thin:@//localhost:1521/XE
+      #          username: ROOT
+      #          password: root
+      #          hikari:
+      #            connectionTestQuery: SELECT 1 FROM DUAL
+      #        postgres:
+      #          type: ${spring.datasource.type}
+      #          driverClassName: org.postgresql.Driver
+      #          url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
+      #          username: root
+      #          password: root
+      #        sqlserver:
+      #          type: ${spring.datasource.type}
+      #          driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
+      #          url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
+      #          username: SA
+      #          password: root
+      hikari:
+        # 最大连接池数量
+        maxPoolSize: 20
+        # 最小空闲线程数量
+        minIdle: 10
+        # 配置获取连接等待超时的时间
+        connectionTimeout: 30000
+        # 校验超时时间
+        validationTimeout: 5000
+        # 空闲连接存活最大时间,默认10分钟
+        idleTimeout: 600000
+        # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
+        maxLifetime: 1800000
+        # 连接测试query(配置检测连接是否有效)
+        connectionTestQuery: SELECT 1
+        # 多久检查一次连接的活性
+        keepaliveTime: 30000
+#  shardingsphere:
+#    datasource:
+#      names: ds1
+#      ds1:
+#        type: com.zaxxer.hikari.HikariDataSource
+#        driver-class-name: com.mysql.cj.jdbc.Driver
+#        jdbcUrl: jdbc:mysql://192.168.2.64:3306/bailian-ai-plus?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
+#        username: root
+#        password: benyun
+#    sharding:
+#      tables:
+#        bl_wd_topological:
+#          actual-data-nodes: ds1.bl_wd_topological_$->{1..20}
+#          key-generator:
+#            column: center_wd_id
+#            type: SNOWFLAKE
+#          table-strategy:
+#            standard:
+#              sharding-column: center_wd_id
+#              precise-algorithm-class-name: com.benyun.core.utils.sharding.ConsistenceHashAlgorithm
+#        bl_topological_store_wd_statistics_category:
+#          actual-data-nodes: ds1.bl_topological_store_wd_statistics_category_$->{1..5}
+#          key-generator:
+#            column: center_wd_id
+#            type: SNOWFLAKE
+#          table-strategy:
+#            standard:
+#              sharding-column: center_wd_id
+#              precise-algorithm-class-name: com.benyun.core.utils.sharding.ConsistenceHashAlgorithm
+#        bl_topological_house_wd_statistics_data:
+#          actual-data-nodes: ds1.bl_topological_house_wd_statistics_data_$->{1..5}
+#          key-generator:
+#            column: center_wd_id
+#            type: SNOWFLAKE
+#          table-strategy:
+#            standard:
+#              sharding-column: center_wd_id
+#              precise-algorithm-class-name: com.benyun.core.utils.sharding.ConsistenceHashAlgorithm
+#        bl_topological_build_wd_statistics_category:
+#          actual-data-nodes: ds1.bl_topological_build_wd_statistics_category_$->{1..5}
+#          key-generator:
+#            column: center_wd_id
+#            type: SNOWFLAKE
+#          table-strategy:
+#            standard:
+#              sharding-column: center_wd_id
+#              precise-algorithm-class-name: com.benyun.core.utils.sharding.ConsistenceHashAlgorithm
+  #  redis: #redis配置
+  #    host: 192.168.2.64  #redis服务地址
+  #    database: 11
+  #    port: 6379       #redis连接端口
+  #    timeout: 5000ms  #连接超时时间
+  #    password: "123456"
+  #    pool:
+  #      minIdle: 1   #连接池中的最小空闲连接
+  #      maxIdle: 10  #连接池中的最大空闲连接
+  #      maxWait: 3   #连接池最大阻塞等待时间(使用负值表示没有限制)
+  #      maxActive: 8 #连接池最大连接数(使用赋值表示没有限制)
+  redis:
+    host: 192.168.2.36
+    port: 7001
+    timeout: 5000ms  #连接超时时间
+    cluster:
+      # 集群节点
+      nodes: 192.168.2.36:7001,192.168.2.36:7002,192.168.2.36:7003,192.168.2.36:7004,192.168.2.36:7005,192.168.2.36:7006
+      # 最大重定向次数
+      max-redirects: 5
+    # 密码
+    password: 123456
+    lettuce:
+      pool:
+        min-idle: 0
+        max-active: 8
+        max-wait: -1
+        max-idle: 8
+        enabled: true
+
+
+#mybatis-plus配置
+mybatis-plus:
+  mapper-locations: classpath*:/*mapper/**/*.xml  #告诉mybatis数据库映射文件mapper.xml的位置
+#  configuration:
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl  #显示sql日志
+#  global-config:
+#    db-config:
+#      id-type: auto
+
+pagehelper:
+  helper-dialect: mysql
+  reasonable: true
+  support-methods-arguments: true
+  params: count=countSql
+
+clear:
+  BrandNames: 麦当劳,肯德基,益禾堂,华莱士,茶百道,书亦烧仙草,星巴克,三品王

+ 1 - 1
benyun-core/src/main/resources/application.yaml

@@ -10,7 +10,7 @@ server:
 # 数据源配置
 spring:
   profiles:
-    active: prod
+    active: test
   application:
     name: bailian-ai #当前服务的名称
 

+ 89 - 10
benyun-core/src/test/java/com/ruoyi/benyun/BenyunCoreApplicationTests.java

@@ -1,38 +1,117 @@
 package com.ruoyi.benyun;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.ruoyi.benyun.constant.RedisContant;
+import com.ruoyi.benyun.constant.RedisInitContant;
+import com.ruoyi.benyun.entity.Brand;
+import com.ruoyi.benyun.entity.StoreWd;
+import com.ruoyi.benyun.mapper.BrandMapper;
+import com.ruoyi.benyun.mapper.StoreWdDao;
 import com.ruoyi.benyun.mapper.WdInfoDao;
-import com.ruoyi.benyun.service.WriteService;
+//import com.ruoyi.benyun.service.WriteService;
 import com.ruoyi.benyun.utils.WdRedisStoreage;
 import org.junit.jupiter.api.Test;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.data.redis.core.BoundValueOperations;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.data.redis.core.ValueOperations;
+import org.springframework.data.redis.serializer.RedisSerializer;
 
 import java.time.LocalDateTime;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
 
 @SpringBootTest
 class BenyunCoreApplicationTests {
     @Autowired
     WdRedisStoreage wdRedisStoreage;
 
+    @Autowired
+    RedisTemplate redisTemplate;
+
+    @Autowired
+    StringRedisTemplate stringRedisTemplate;
+
     @Autowired
     WdInfoDao wdInfoDao;
 
+    //@Autowired
+    //WriteService writeService;
+
+    @Value("${clear.BrandNames}")
+    String[] brandNames;
+
+    @Autowired
+    BrandMapper brandMapper;
+
     @Autowired
-    WriteService writeService;
+    StoreWdDao storeWdDao;
 
     @Test
     void contextLoads() {
-        ArrayList<String> list = new ArrayList<>();
-        list.add(RedisContant.WD_TAG+"_"+"00003743d4b047aab0e8ab9481225fbf");
-        list.add(RedisContant.WD_TAG+"_"+"000040593b0e4c7f82b798d30604f350");
-        list.add(RedisContant.WD_TAG+"_"+"0000f8d2a49043cf8e4525241faf5fb9");
-        List<List<String>> wdTagList = wdRedisStoreage.getWdTagList(list);
-        System.out.println(wdTagList);
-
-        //List<String> wdTag = wdRedisStoreage.getWdTag(null);
+        ArrayList<String> moreBrandName = new ArrayList<>();
+        ArrayList<String> existBrandName = new ArrayList<>();
+        for (String brandName : brandNames) {
+            //1.找到主品牌
+            QueryWrapper<Brand> queryWrapper = new QueryWrapper<>();
+            queryWrapper.select("brand_id","brand_name");
+            queryWrapper.eq("brand_name",brandName);
+            try {
+                Brand brand = brandMapper.selectOne(queryWrapper);
+                if (brand == null){
+                    existBrandName.add(brandName);
+                    continue;
+                }
+
+
+                //2.找到其他类似的品牌名
+                QueryWrapper<Brand> queryWrapper1 = new QueryWrapper<>();
+                queryWrapper1.select("brand_id","brand_name");
+                queryWrapper1.like("brand_name",brandName);
+
+                queryWrapper1.and(brandQueryWrapper -> {
+                    brandQueryWrapper.ne("brand_id",brand.getBrandId());
+                });
+                List<Brand> brands = brandMapper.selectList(queryWrapper1);
+
+                //3.修改对应的品牌绑定
+                List<Object> collect = brands.stream().map(item -> {
+                    return item.getBrandId();
+                }).collect(Collectors.toList());
+                if (collect.isEmpty())
+                    continue;
+
+                UpdateWrapper<StoreWd> updateWrapper = new UpdateWrapper<>();
+                updateWrapper.set("brand_id",brand.getBrandId());
+                updateWrapper.set("brand_name",brand.getBrandName());
+                updateWrapper.in("brand_id",collect);
+                storeWdDao.update(null,updateWrapper);
+
+                //4.修改完毕后,删除对应的品牌信息
+                QueryWrapper<Brand> queryWrapper2 = new QueryWrapper<>();
+                queryWrapper2.in("brand_id",collect);
+                brandMapper.delete(queryWrapper2);
+            }catch (Exception exception){
+                exception.printStackTrace();
+                moreBrandName.add(brandName);
+            }
+        }
+
+        System.out.println("不存在品牌:");
+        for (String s : existBrandName) {
+            System.out.println(s);
+        }
+
+        System.out.println("出错品牌:");
+        for (String s : moreBrandName) {
+            System.out.println(s);
+        }
     }
 
 

+ 12 - 1
pom.xml

@@ -66,6 +66,17 @@
                 <logging.level>debug</logging.level>
             </properties>
         </profile>
+        <profile>
+            <id>test</id>
+            <properties>
+                <profiles.active>test</profiles.active>
+                <logging.level>warn</logging.level>
+            </properties>
+            <activation>
+                <!-- 默认环境 -->
+                <activeByDefault>true</activeByDefault>
+            </activation>
+        </profile>
         <profile>
             <id>prod</id>
             <properties>
@@ -74,7 +85,7 @@
             </properties>
             <activation>
                 <!-- 默认环境 -->
-                <activeByDefault>true</activeByDefault>
+                <activeByDefault>false</activeByDefault>
             </activation>
         </profile>
     </profiles>

+ 4 - 4
ruoyi-admin/Dockerfile

@@ -2,11 +2,11 @@ FROM anapsix/alpine-java:8_server-jre_unlimited
 
 MAINTAINER hst
 
-RUN mkdir -p /data/ruoyi-admin-plus/logs \
-    /data/ruoyi-admin-plus/temp \
-    /data/ruoyi-admin-plus/agent
+RUN mkdir -p /data/bailian-admin/logs \
+    /data/bailian-admin/temp \
+    /data/bailian-admin/agent
 
-WORKDIR /data/ruoyi-admin-plus
+WORKDIR /data/bailian-admin
 
 #ENV SERVER_PORT=8080
 

+ 24 - 26
ruoyi-admin/src/main/resources/application-prod.yml

@@ -21,14 +21,14 @@ xxl.job:
   # 执行器开关
   enabled: true
   # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
-  admin-addresses: http://localhost:9100/xxl-job-admin
+  admin-addresses: http://192.168.0.26:8080/xxl-job-admin
   # 执行器通讯TOKEN:非空时启用
-  access-token: xxl-job
+  access-token: tokenixuemtuoekpjmixhddlhzssuquvvlxya
   executor:
     # 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
-    appname: xxl-job-executor
+    appname: benyun-bailian
     # 执行器端口号 执行器从9101开始往后写
-    port: 9101
+    port: 9106
     # 执行器注册:默认IP:PORT
     address:
     # 执行器IP:默认自动获取IP
@@ -57,18 +57,18 @@ spring:
           driverClassName: com.mysql.cj.jdbc.Driver
           # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
           # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
-          url: jdbc:mysql://192.168.2.64:3306/bailian-ai-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          url: jdbc:mysql://192.168.0.31:3306/benyun-bailian?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
           username: root
-          password: benyun
+          password: LongX@321
 
         # 从库数据源
         slave:
           lazy: true
           type: ${spring.datasource.type}
           driverClassName: com.mysql.cj.jdbc.Driver
-          url: jdbc:mysql://192.168.2.64:3306/bailian-ai-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
-          username:
-          password:
+          url: jdbc:mysql://192.168.0.31:3306/benyun-bailian?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          username: root
+          password: LongX@321
 #        oracle:
 #          type: ${spring.datasource.type}
 #          driverClassName: oracle.jdbc.OracleDriver
@@ -107,20 +107,18 @@ spring:
         # 多久检查一次连接的活性
         keepaliveTime: 30000
   redis:
-    cluster:
-      # 集群节点
-      nodes:
-        - 192.168.2.99:7001
-        - 192.168.2.99:7002
-        - 192.168.2.99:7003
-        - 192.168.2.99:7004
-        - 192.168.2.99:7005
-        - 192.168.2.99:7006
-      # 最大重定向次数
-      max-redirects: 5
-    # 密码
-    password: 123456
-    database: 1
+    # 地址
+    host: 192.168.0.34
+    # 端口,默认为6379
+    port: 6379
+    # 数据库索引
+    database: 12
+    # 密码(如没有密码请注释掉)
+    password: lsf@12345
+    # 连接超时时间
+    timeout: 10s
+    # 是否开启ssl
+    ssl: false
     lettuce:
       pool:
         min-idle: 0
@@ -128,16 +126,14 @@ spring:
         max-wait: -1
         max-idle: 8
         enabled: true
-    timeout: 600000
 
-#  #redisson:
+#redisson:
 #  # redis key前缀
 #  keyPrefix:
 #  # 线程池数量
 #  threads: 16
 #  # Netty线程池数量
 #  nettyThreads: 32
-##  # 单节点配置
 ##  singleServerConfig:
 #  # 单节点配置
 #  clusterServersConfig:
@@ -154,6 +150,8 @@ spring:
 #    # 发布和订阅连接池大小
 #    subscriptionConnectionPoolSize: 50
 
+
+
 --- # mail 邮件发送
 mail:
   enabled: false

+ 210 - 0
ruoyi-admin/src/main/resources/application-test.yml

@@ -0,0 +1,210 @@
+--- # 临时文件存储位置 避免临时文件被系统清理报错
+spring.servlet.multipart.location: /ruoyi/server/temp
+server:
+  port: 8080
+  servlet:
+    # 应用的访问路径
+    context-path: /jzyx
+
+--- # 监控中心配置
+spring.boot.admin.client:
+  # 增加客户端开关
+  enabled: false
+  url: http://localhost:9090/admin
+  instance:
+    service-host-type: IP
+  username: ruoyi
+  password: 123456
+
+--- # xxl-job 配置
+xxl.job:
+  # 执行器开关
+  enabled: true
+  # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
+  admin-addresses: http://localhost:9100/xxl-job-admin
+  # 执行器通讯TOKEN:非空时启用
+  access-token: xxl-job
+  executor:
+    # 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
+    appname: xxl-job-executor
+    # 执行器端口号 执行器从9101开始往后写
+    port: 9101
+    # 执行器注册:默认IP:PORT
+    address:
+    # 执行器IP:默认自动获取IP
+    ip:
+    # 执行器运行日志文件存储磁盘路径
+    logpath: ./logs/xxl-job
+    # 执行器日志文件保存天数:大于3生效
+    logretentiondays: 30
+
+--- # 数据源配置
+spring:
+  datasource:
+    type: com.zaxxer.hikari.HikariDataSource
+    # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
+    dynamic:
+      # 性能分析插件(有性能损耗 不建议生产环境使用)
+      p6spy: false
+      # 设置默认的数据源或者数据源组,默认值即为 master
+      primary: master
+      # 严格模式 匹配不到数据源则报错
+      strict: true
+      datasource:
+        # 主库数据源
+        master:
+          type: ${spring.datasource.type}
+          driverClassName: com.mysql.cj.jdbc.Driver
+          # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
+          # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
+          url: jdbc:mysql://192.168.2.64:3306/bailian-ai-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          username: root
+          password: benyun
+
+        # 从库数据源
+        slave:
+          lazy: true
+          type: ${spring.datasource.type}
+          driverClassName: com.mysql.cj.jdbc.Driver
+          url: jdbc:mysql://192.168.2.64:3306/bailian-ai-plus?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          username:
+          password:
+#        oracle:
+#          type: ${spring.datasource.type}
+#          driverClassName: oracle.jdbc.OracleDriver
+#          url: jdbc:oracle:thin:@//localhost:1521/XE
+#          username: ROOT
+#          password: root
+#          hikari:
+#            connectionTestQuery: SELECT 1 FROM DUAL
+#        postgres:
+#          type: ${spring.datasource.type}
+#          driverClassName: org.postgresql.Driver
+#          url: jdbc:postgresql://localhost:5432/postgres?useUnicode=true&characterEncoding=utf8&useSSL=true&autoReconnect=true&reWriteBatchedInserts=true
+#          username: root
+#          password: root
+#        sqlserver:
+#          type: ${spring.datasource.type}
+#          driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
+#          url: jdbc:sqlserver://localhost:1433;DatabaseName=tempdb;SelectMethod=cursor;encrypt=false;rewriteBatchedStatements=true
+#          username: SA
+#          password: root
+      hikari:
+        # 最大连接池数量
+        maxPoolSize: 20
+        # 最小空闲线程数量
+        minIdle: 10
+        # 配置获取连接等待超时的时间
+        connectionTimeout: 30000
+        # 校验超时时间
+        validationTimeout: 5000
+        # 空闲连接存活最大时间,默认10分钟
+        idleTimeout: 600000
+        # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
+        maxLifetime: 1800000
+        # 连接测试query(配置检测连接是否有效)
+        connectionTestQuery: SELECT 1
+        # 多久检查一次连接的活性
+        keepaliveTime: 30000
+  redis:
+    cluster:
+      # 集群节点
+      nodes:
+        - 192.168.2.36:7001
+        - 192.168.2.36:7002
+        - 192.168.2.36:7003
+        - 192.168.2.36:7004
+        - 192.168.2.36:7005
+        - 192.168.2.36:7006
+      # 最大重定向次数
+      max-redirects: 5
+    # 密码
+    password: 123456
+    lettuce:
+      pool:
+        min-idle: 0
+        max-active: 12
+        max-wait: -1
+        max-idle: 8
+        enabled: true
+    timeout: 600000
+
+#redisson:
+#  # redis key前缀
+#  keyPrefix:
+#  # 线程池数量
+#  threads: 16
+#  # Netty线程池数量
+#  nettyThreads: 32
+##  singleServerConfig:
+#  # 单节点配置
+#  clusterServersConfig:
+#    # 客户端名称
+#    clientName: ${ruoyi.name}
+#    # 最小空闲连接数
+#    connectionMinimumIdleSize: 32
+#    # 连接池大小
+#    connectionPoolSize: 64
+#    # 连接空闲超时,单位:毫秒
+#    idleConnectionTimeout: 10000
+#    # 命令等待超时,单位:毫秒
+#    timeout: 6000
+#    # 发布和订阅连接池大小
+#    subscriptionConnectionPoolSize: 50
+
+
+
+--- # mail 邮件发送
+mail:
+  enabled: false
+  host: smtp.163.com
+  port: 465
+  # 是否需要用户名密码验证
+  auth: true
+  # 发送方,遵循RFC-822标准
+  from: xxx@163.com
+  # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
+  user: xxx@163.com
+  # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
+  pass: xxxxxxxxxx
+  # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
+  starttlsEnable: true
+  # 使用SSL安全连接
+  sslEnable: true
+  # SMTP超时时长,单位毫秒,缺省值不超时
+  timeout: 0
+  # Socket连接超时值,单位毫秒,缺省值不超时
+  connectionTimeout: 0
+
+--- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
+# https://wind.kim/doc/start 文档地址 各个厂商可同时使用
+sms:
+  # 阿里云 dysmsapi.aliyuncs.com
+  alibaba:
+    #请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
+    requestUrl: dysmsapi.aliyuncs.com
+    #阿里云的accessKey
+    accessKeyId: xxxxxxx
+    #阿里云的accessKeySecret
+    accessKeySecret: xxxxxxx
+    #短信签名
+    signature: 测试
+  tencent:
+    #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
+    requestUrl: sms.tencentcloudapi.com
+    #腾讯云的accessKey
+    accessKeyId: xxxxxxx
+    #腾讯云的accessKeySecret
+    accessKeySecret: xxxxxxx
+    #短信签名
+    signature: 测试
+    #短信sdkAppId
+    sdkAppId: appid
+    #地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
+    territory: ap-guangzhou
+
+pagehelper:
+  helper-dialect: mysql
+  reasonable: true
+  support-methods-arguments: true
+  params: count=countSql

+ 0 - 2
ruoyi-demo/src/main/java/com/ruoyi/demo/config/RedisConfiguration.java

@@ -42,8 +42,6 @@ public class RedisConfiguration {
         redisTemplate.setValueSerializer(valueSerializer());
         redisTemplate.setHashValueSerializer(valueSerializer());
 
-        redisTemplate.setConnectionFactory(redisConnectionFactory);
-
         return redisTemplate;
     }
 

+ 4 - 4
ruoyi-demo/src/main/java/com/ruoyi/demo/controller/ChannelAnalyseController.java

@@ -73,10 +73,10 @@ public class ChannelAnalyseController {
         String md5 = channelMapAceeptVo.getHash();
 
         //2.查看redis中是否存在有缓存
-//        List<StoreWdCategoryCount> wdCount = (List<StoreWdCategoryCount>) redisTemplate.boundHashOps(RedisContant.CHANNEL_ANALYSE_CATEGORY).get(md5);
-//        if (wdCount != null) {
-//            return R.ok(wdCount);
-//        }
+        List<StoreWdCategoryCount> wdCount = (List<StoreWdCategoryCount>) redisTemplate.boundHashOps(RedisContant.CHANNEL_ANALYSE_CATEGORY).get(md5);
+        if (wdCount != null) {
+            return R.ok(wdCount);
+        }
 
 
         List<StoreWdCategoryCount> category = channelAnalyseService.category(channelMapAceeptVo);

+ 3 - 0
ruoyi-demo/src/main/java/com/ruoyi/demo/init/BenyunCoreInit.java

@@ -2,6 +2,7 @@ package com.ruoyi.demo.init;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 
+import com.ruoyi.demo.config.RedisConfiguration;
 import com.ruoyi.demo.constant.RedisInitContant;
 import com.ruoyi.demo.entity.AddrCategory;
 import com.ruoyi.demo.entity.ManageType;
@@ -10,8 +11,10 @@ import com.ruoyi.demo.mapper.AddrCategoryDao;
 import com.ruoyi.demo.mapper.TypeByDao;
 import com.ruoyi.demo.service.ManageTypeService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
 import org.springframework.data.redis.core.BoundHashOperations;
 import org.springframework.data.redis.core.RedisTemplate;
 

+ 2 - 0
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/BusinessOpportunitiesServiceImpl.java

@@ -14,6 +14,7 @@ import com.ruoyi.demo.mapper.FollowUpDao;
 import com.ruoyi.demo.service.BusinessOpportunitiesService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.time.LocalDateTime;
 import java.time.ZoneId;
@@ -22,6 +23,7 @@ import java.util.List;
 import java.util.UUID;
 
 @Service
+@Transactional
 public class BusinessOpportunitiesServiceImpl implements BusinessOpportunitiesService {
     @Autowired
     BusinessOpportunitiesDao businessOpportunitiesDao;

+ 2 - 0
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/CategoryServiceImpl.java

@@ -6,10 +6,12 @@ import com.ruoyi.demo.mapper.CategoryMapper;
 import com.ruoyi.demo.service.CategoryService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
 
 @Service
+@Transactional
 public class CategoryServiceImpl implements CategoryService {
     public List<Category> addrCategory;
     public List<Category> typeBy;

+ 22 - 26
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/ChannelAnalyseServiceImpl.java

@@ -30,6 +30,7 @@ import org.springframework.data.geo.Point;
 import org.springframework.data.redis.connection.RedisGeoCommands;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.client.RestTemplate;
 
 import java.math.BigDecimal;
@@ -40,6 +41,7 @@ import java.util.concurrent.ExecutorService;
 import java.util.stream.Collectors;
 
 @Service
+@Transactional
 public class ChannelAnalyseServiceImpl implements ChannelAnalyseService {
 
     @Autowired
@@ -118,7 +120,7 @@ public class ChannelAnalyseServiceImpl implements ChannelAnalyseService {
         queryWrapper.select("wd_id");
         assembleQueryWrapper(queryWrapper,channelMapAceeptVo);
         queryWrapper.and(queryWrapper2 ->{
-            queryWrapper2.eq("deleted",0);
+            queryWrapper2.eq("show_delete",0);
         });
         List<WdInfo> queryWd = wdInfoDao.selectList(queryWrapper);
 
@@ -230,7 +232,7 @@ public class ChannelAnalyseServiceImpl implements ChannelAnalyseService {
         queryWrapper.select("wd_id");
         assembleQueryWrapper(queryWrapper,channelMapAceeptVo);
         queryWrapper.and(queryWrapper2 ->{
-            queryWrapper2.eq("deleted",0);
+            queryWrapper2.eq("show_delete",0);
         });
 
         //门店
@@ -307,7 +309,7 @@ public class ChannelAnalyseServiceImpl implements ChannelAnalyseService {
             queryWrapper1.eq("wd_type_code","1");
         });
         queryWrapper.and(queryWrapper2 ->{
-            queryWrapper2.eq("deleted",0);
+            queryWrapper2.eq("show_delete",0);
         });
 
         List<StoreWd> storeWds = storeWdDao.businessStatusAnalyse(queryWrapper);
@@ -379,43 +381,37 @@ public class ChannelAnalyseServiceImpl implements ChannelAnalyseService {
             queryWrapper1.eq("wd_type_code","1");
         });
         queryWrapper.and(queryWrapper2 ->{
-            queryWrapper2.eq("deleted",0);
+            queryWrapper2.eq("show_delete",0);
         });
 
         List<StoreWd> storeWds = storeWdDao.perCapitaConsumpAnalyse(queryWrapper);
-        HashMap<String, Integer> hashMap = new HashMap<>();
-        hashMap.put("0~20",0);
-        hashMap.put("20~50",0);
-        hashMap.put("50~100",0);
-        hashMap.put("100~200",0);
-        hashMap.put("200以上",0);
+        LinkedHashMap<String, Integer> linkedHashMap = new LinkedHashMap<>();
+        linkedHashMap.put("0~20",0);
+        linkedHashMap.put("20~50",0);
+        linkedHashMap.put("50~100",0);
+        linkedHashMap.put("100~200",0);
+        linkedHashMap.put("200以上",0);
         for (StoreWd storeWd : storeWds) {
             if (storeWd.getPerCapitaConsumption() != null){
                 if (storeWd.getPerCapitaConsumption() >= 0 && storeWd.getPerCapitaConsumption()<20){
-                    hashMap.put("0~20",hashMap.get("0~20")+1);
+                    linkedHashMap.put("0~20",linkedHashMap.get("0~20")+1);
                 }else if(storeWd.getPerCapitaConsumption() >= 20 && storeWd.getPerCapitaConsumption()<50){
-                    hashMap.put("20~50",hashMap.get("20~50")+1);
+                    linkedHashMap.put("20~50",linkedHashMap.get("20~50")+1);
                 }else if(storeWd.getPerCapitaConsumption() >= 50 && storeWd.getPerCapitaConsumption()< 100){
-                    hashMap.put("50~100",hashMap.get("50~100")+1);
+                    linkedHashMap.put("50~100",linkedHashMap.get("50~100")+1);
                 }else if(storeWd.getPerCapitaConsumption() >= 100 && storeWd.getPerCapitaConsumption()< 200){
-                    hashMap.put("100~200",hashMap.get("100~200")+1);
+                    linkedHashMap.put("100~200",linkedHashMap.get("100~200")+1);
                 }else {
-                    hashMap.put("200以上",hashMap.get("200以上")+1);
+                    linkedHashMap.put("200以上",linkedHashMap.get("200以上")+1);
                 }
             }
         }
 
         ArrayList<Histogram> list = new ArrayList<>();
-        Histogram histogram1 = new Histogram("0~20",hashMap.get("0~20"));
-        Histogram histogram2 = new Histogram("20~50",hashMap.get("20~50"));
-        Histogram histogram3 = new Histogram("50~100",hashMap.get("50~100"));
-        Histogram histogram4 = new Histogram("100~200",hashMap.get("100~200"));
-        Histogram histogram5 = new Histogram("200以上",hashMap.get("200以上"));
-        list.add(histogram1);
-        list.add(histogram2);
-        list.add(histogram3);
-        list.add(histogram4);
-        list.add(histogram5);
+        for (String s : linkedHashMap.keySet()) {
+            Histogram histogram1 = new Histogram(s,linkedHashMap.get(s));
+            list.add(histogram1);
+        }
         return list;
     }
 
@@ -428,7 +424,7 @@ public class ChannelAnalyseServiceImpl implements ChannelAnalyseService {
             queryWrapper1.eq("wd_type_code","1");
         });
         queryWrapper.and(queryWrapper2 ->{
-            queryWrapper2.eq("deleted",0);
+            queryWrapper2.eq("show_delete",0);
         });
 
         List<StoreWd> storeWds = storeWdDao.operateTimeAnalyse(queryWrapper);

+ 2 - 1
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/ChannelMapServiceImpl.java

@@ -15,6 +15,7 @@ import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -23,6 +24,7 @@ import java.util.List;
 
 @RequiredArgsConstructor
 @Service
+@Transactional
 public class ChannelMapServiceImpl implements ChannelMapService {
 
     @Autowired
@@ -235,7 +237,6 @@ public class ChannelMapServiceImpl implements ChannelMapService {
             WdTopologicalInfoBo wdTopologicalInfoBo = new WdTopologicalInfoBo(wdInfo);
             wdTopologicalInfoBo.setAddrCodeInfo(initMapUtil.getInitAddrCodeMap(wdInfo.getAddrCode()));
             List<String> tags = wdRedisStoreage.getWdTag(wdInfo);
-            System.out.println(tags);
             wdTopologicalInfoBo.setTag(tags);
             result.add(wdTopologicalInfoBo);
         }

+ 2 - 0
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/CommonServiceImpl.java

@@ -10,12 +10,14 @@ import com.ruoyi.demo.mapper.TypeByDao;
 import com.ruoyi.demo.service.CommonService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 
 @Service
+@Transactional
 public class CommonServiceImpl implements CommonService {
 
     @Autowired

+ 2 - 0
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/DatabackServiceImpl.java

@@ -15,6 +15,7 @@ import com.ruoyi.demo.mapper.FollowUpDao;
 import com.ruoyi.demo.service.DatabackService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.time.LocalDateTime;
 import java.time.ZoneId;
@@ -23,6 +24,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 @Service
+@Transactional
 public class DatabackServiceImpl implements DatabackService {
     @Autowired
     AttentionPoolStatisticsDao attentionPoolStatisticsDao;

+ 2 - 0
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/TopologicalCommonServiceImpl.java

@@ -16,12 +16,14 @@ import org.springframework.data.geo.Point;
 import org.springframework.data.redis.connection.RedisGeoCommands;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
 @Service
+@Transactional
 public class TopologicalCommonServiceImpl implements TopologicalCommonService {
     @Autowired
     WdInfoDao wdInfoDao;

+ 2 - 0
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/TopologicalEnterpriseWdServiceImpl.java

@@ -17,6 +17,7 @@ import org.springframework.data.geo.Point;
 import org.springframework.data.redis.connection.RedisGeoCommands;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -24,6 +25,7 @@ import java.util.HashMap;
 import java.util.List;
 
 @Service
+@Transactional
 public class TopologicalEnterpriseWdServiceImpl implements TopologicalEnterpriseWdService {
 
     @Autowired

+ 2 - 0
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/TopologicalHouseServiceWdImpl.java

@@ -19,6 +19,7 @@ import org.springframework.data.geo.Point;
 import org.springframework.data.redis.connection.RedisGeoCommands;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -26,6 +27,7 @@ import java.util.HashMap;
 import java.util.List;
 
 @Service
+@Transactional
 public class TopologicalHouseServiceWdImpl implements TopologicalHouseWdService {
 
 

+ 2 - 0
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/TopologicalStoreWdServiceImpl.java

@@ -23,6 +23,7 @@ import org.springframework.data.geo.Point;
 import org.springframework.data.redis.connection.RedisGeoCommands;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
@@ -30,6 +31,7 @@ import java.util.HashMap;
 import java.util.List;
 
 @Service
+@Transactional
 public class TopologicalStoreWdServiceImpl implements TopologicalStoreWdService {
 
     @Autowired

+ 2 - 0
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/WdInfoServiceImpl.java

@@ -12,6 +12,7 @@ import com.ruoyi.demo.service.WdInfoService;
 import com.ruoyi.demo.utils.CategoryUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.time.LocalDateTime;
 import java.time.ZoneId;
@@ -20,6 +21,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 @Service
+@Transactional
 public class WdInfoServiceImpl implements WdInfoService {
     @Autowired
     CategoryUtil categoryUtil;

+ 0 - 1
ruoyi-demo/src/main/java/com/ruoyi/demo/service/impl/package-info.java

@@ -1 +0,0 @@
-package com.ruoyi.demo.service.impl;

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/SysLoginService.java

@@ -198,6 +198,7 @@ public class SysLoginService {
      */
     public void validateCaptcha(String username, String code, String uuid) {
         String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + StringUtils.defaultString(uuid, "");
+        System.out.println("verifyKey"+verifyKey);
         String captcha = RedisUtils.getCacheObject(verifyKey);
         RedisUtils.deleteObject(verifyKey);
         if (captcha == null) {

+ 4 - 4
ruoyi-ui/vue.config.js

@@ -35,17 +35,17 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API + "/bailianAi"]:{
-        target: `http://127.0.0.1:8080`,
+        target: `http://192.168.2.207:8080`,
         changeOrigin: true,
         pathRewrite: {
-          ['^' + process.env.VUE_APP_BASE_API + '/bailianAi']: '',
+          ['^' + process.env.VUE_APP_BASE_API + '/bailianAi']: '/jzyx',
         }
       },
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://127.0.0.1:8080`,
+        target: `http://192.168.2.207:8080`,
         changeOrigin: true,
         pathRewrite: {
-          ['^' + process.env.VUE_APP_BASE_API]: ''
+          ['^' + process.env.VUE_APP_BASE_API]: '/jzyx'
         }
       }
     },