浏览代码

数据回收站开发完成并已部署(v3.0)

JensionDzero 2 年之前
父节点
当前提交
57a7c6e461
共有 26 个文件被更改,包括 280 次插入39 次删除
  1. 19 2
      .run/ruoyi-monitor-admin.run.xml
  2. 19 2
      .run/ruoyi-server.run.xml
  3. 19 2
      .run/ruoyi-xxl-job-admin.run.xml
  4. 43 0
      benyun-core/src/main/java/com/benyun/core/controller/BrandRecycleController.java
  5. 7 2
      benyun-core/src/main/java/com/benyun/core/controller/WdRecycleController.java
  6. 6 0
      benyun-core/src/main/java/com/benyun/core/dao/BrandMapper.java
  7. 3 1
      benyun-core/src/main/java/com/benyun/core/entity/Brand.java
  8. 2 0
      benyun-core/src/main/java/com/benyun/core/entity/WdInfo.java
  9. 55 0
      benyun-core/src/main/java/com/benyun/core/entity/vo/BrandVo.java
  10. 1 1
      benyun-core/src/main/java/com/benyun/core/entity/vo/WdInfoVo.java
  11. 15 0
      benyun-core/src/main/java/com/benyun/core/service/BrandRecycleService.java
  12. 41 0
      benyun-core/src/main/java/com/benyun/core/service/impl/BrandRecycleServiceImpl.java
  13. 2 0
      benyun-core/src/main/java/com/benyun/core/service/impl/WdRecycleServiceImpl.java
  14. 1 1
      benyun-core/src/main/resources/application.yaml
  15. 17 0
      benyun-core/src/main/resources/mapper/BrandMapper.xml
  16. 1 1
      benyun-core/src/main/resources/mapper/WdInfoMapper.xml
  17. 5 4
      pom.xml
  18. 4 4
      ruoyi-admin/Dockerfile
  19. 7 6
      ruoyi-admin/src/main/resources/application-prod.yml
  20. 2 2
      ruoyi-extend/ruoyi-monitor-admin/Dockerfile
  21. 4 4
      ruoyi-extend/ruoyi-xxl-job-admin/Dockerfile
  22. 2 2
      ruoyi-extend/ruoyi-xxl-job-admin/src/main/resources/application-prod.yml
  23. 1 1
      ruoyi-ui/.env.development
  24. 1 1
      ruoyi-ui/.env.production
  25. 1 1
      ruoyi-ui/package.json
  26. 2 2
      ruoyi-ui/vue.config.js

+ 19 - 2
.run/ruoyi-monitor-admin.run.xml

@@ -3,10 +3,27 @@
     <deployment type="dockerfile">
       <settings>
         <option name="imageTag" value="ruoyi/ruoyi-monitor-admin:4.8.0" />
-        <option name="buildOnly" value="true" />
+        <option name="containerName" value="ruoyi-monitor-admin" />
+        <option name="envVars">
+          <list>
+            <DockerEnvVarImpl>
+              <option name="name" value="TZ" />
+              <option name="value" value="Shanghai" />
+            </DockerEnvVarImpl>
+          </list>
+        </option>
+        <option name="commandLineOptions" value="--network host" />
         <option name="sourceFilePath" value="ruoyi-extend/ruoyi-monitor-admin/Dockerfile" />
+        <option name="volumeBindings">
+          <list>
+            <DockerVolumeBindingImpl>
+              <option name="containerPath" value="/rouyi/server/logs" />
+              <option name="hostPath" value="/ruoyi/server/logs" />
+            </DockerVolumeBindingImpl>
+          </list>
+        </option>
       </settings>
     </deployment>
     <method v="2" />
   </configuration>
-</component>
+</component>

+ 19 - 2
.run/ruoyi-server.run.xml

@@ -3,10 +3,27 @@
     <deployment type="dockerfile">
       <settings>
         <option name="imageTag" value="ruoyi/ruoyi-server:4.8.0" />
-        <option name="buildOnly" value="true" />
+        <option name="containerName" value="ruoyi-server" />
+        <option name="envVars">
+          <list>
+            <DockerEnvVarImpl>
+              <option name="name" value="TZ" />
+              <option name="value" value="Shanghai" />
+            </DockerEnvVarImpl>
+          </list>
+        </option>
+        <option name="commandLineOptions" value="--network host" />
         <option name="sourceFilePath" value="ruoyi-admin/Dockerfile" />
+        <option name="volumeBindings">
+          <list>
+            <DockerVolumeBindingImpl>
+              <option name="containerPath" value="/rouyi/server/logs" />
+              <option name="hostPath" value="/rouyi/server/logs" />
+            </DockerVolumeBindingImpl>
+          </list>
+        </option>
       </settings>
     </deployment>
     <method v="2" />
   </configuration>
-</component>
+</component>

+ 19 - 2
.run/ruoyi-xxl-job-admin.run.xml

@@ -3,10 +3,27 @@
     <deployment type="dockerfile">
       <settings>
         <option name="imageTag" value="ruoyi/ruoyi-xxl-job-admin:4.8.0" />
-        <option name="buildOnly" value="true" />
+        <option name="containerName" value="ruoyi-xxl-job-admin" />
+        <option name="envVars">
+          <list>
+            <DockerEnvVarImpl>
+              <option name="name" value="TZ" />
+              <option name="value" value="Shanghai" />
+            </DockerEnvVarImpl>
+          </list>
+        </option>
+        <option name="commandLineOptions" value="--network host" />
         <option name="sourceFilePath" value="ruoyi-extend/ruoyi-xxl-job-admin/Dockerfile" />
+        <option name="volumeBindings">
+          <list>
+            <DockerVolumeBindingImpl>
+              <option name="containerPath" value="/rouyi/xxljob/logs" />
+              <option name="hostPath" value="/rouyi/xxljob/logs" />
+            </DockerVolumeBindingImpl>
+          </list>
+        </option>
       </settings>
     </deployment>
     <method v="2" />
   </configuration>
-</component>
+</component>

+ 43 - 0
benyun-core/src/main/java/com/benyun/core/controller/BrandRecycleController.java

@@ -0,0 +1,43 @@
+package com.benyun.core.controller;
+
+import com.benyun.core.entity.Brand;
+import com.benyun.core.entity.vo.BrandVo;
+import com.benyun.core.service.BrandRecycleService;
+import com.github.pagehelper.PageInfo;
+import com.ruoyi.common.core.domain.R;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.HashMap;
+import java.util.List;
+
+@RestController
+@RequestMapping("/recycle/brand")
+public class BrandRecycleController {
+    @Autowired
+    BrandRecycleService brandRecycleService;
+
+    @GetMapping("/list")
+    public R list(BrandVo brandVo){
+        PageInfo<Brand> list = brandRecycleService.list(brandVo);
+        return R.ok(list);
+    }
+
+    //移除
+    @DeleteMapping("/deleteBrand/{brandId}")
+    public R deleteBrand(@PathVariable("brandId") String brandId){
+        brandRecycleService.deleteBrand(brandId);
+        return R.ok();
+    }
+
+    //恢复
+    @PutMapping("/recoverBrand")
+    public R recoverBrand(@RequestBody HashMap<String,String> hashMap){
+        if(hashMap.get("brandId") == null)
+            return R.fail(400,"brandId不能为空");
+
+        brandRecycleService.recoverBrand(hashMap.get("brandId"));
+        return R.ok();
+    }
+
+}

+ 7 - 2
benyun-core/src/main/java/com/benyun/core/controller/WdRecycleController.java

@@ -86,9 +86,14 @@ public class WdRecycleController {
 
     //恢复
     @PutMapping("/recoverWd")
-    public R recoverWd(@RequestBody String wdId){
-        wdRecycleService.recoverWd(wdId);
+    public R recoverWd(@RequestBody HashMap<String,String> hashMap){
+        if (hashMap.get("wdId") == null)
+            return R.fail(400,"wdId不能为空");
+
+        wdRecycleService.recoverWd(hashMap.get("wdId"));
         return R.ok();
     }
 
+
+
 }

+ 6 - 0
benyun-core/src/main/java/com/benyun/core/dao/BrandMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.benyun.core.entity.Brand;
 import com.benyun.core.entity.bo.BrandAddrDistribution;
 import com.benyun.core.entity.bo.BrandSearch;
+import com.benyun.core.entity.vo.BrandVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -15,4 +16,9 @@ public interface BrandMapper extends BaseMapper<Brand> {
     Brand searchById(String brandId);
     List<Brand> searchByIndustryCodeList(String brandId, String industryCode);
     List<BrandSearch> searchSearchByMulti(@Param("text") String text,@Param("industryCode") List<String> industryCode,@Param("countUp") Integer countUp,@Param("countDown") Integer countDown,@Param("coverUp") Integer coverUp,@Param("coverDown") Integer coverDown);
+
+    //管理中心:品牌回收站
+    List<Brand> list(BrandVo brandVo);
+
+    void recoverBrand(String brandId);
 }

+ 3 - 1
benyun-core/src/main/java/com/benyun/core/entity/Brand.java

@@ -2,6 +2,7 @@ package com.benyun.core.entity;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@@ -14,7 +15,7 @@ import java.time.LocalDateTime;
 import java.util.Date;
 
 @Data
-@TableName("ddt_origin_brand")
+@TableName("ddt_brand")
 public class Brand {
     @TableId("brand_id")
     private String brandId;
@@ -67,6 +68,7 @@ public class Brand {
     @JsonDeserialize(using = LocalDateTimeDeserializer.class)
     private LocalDateTime updateTime;
 
+    @TableLogic
     @TableField("show_delete")
     private int showDelete;
 }

+ 2 - 0
benyun-core/src/main/java/com/benyun/core/entity/WdInfo.java

@@ -2,6 +2,7 @@ package com.benyun.core.entity;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
@@ -81,5 +82,6 @@ public class WdInfo {
     private String geoHash;
 
     @TableField("show_delete")
+    @TableLogic
     private int showDelete;
 }

+ 55 - 0
benyun-core/src/main/java/com/benyun/core/entity/vo/BrandVo.java

@@ -0,0 +1,55 @@
+package com.benyun.core.entity.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+@Data
+public class BrandVo {
+    private String brandId;
+    private String brandImg;
+    private String brandName;
+    private String industryCode;
+    private String enterpriseUsci;
+    private Float perCapitaConsumption;
+    private Long commentCount;
+    private Float score;
+    private String menuInfo;
+    private Float indexScore;
+    private String contact;
+    private String telephone;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonSerialize(using = LocalDateTimeSerializer.class)
+    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
+    private LocalDateTime createDate;
+    private Long audit;
+    private String collectPerson;
+    @JsonSerialize(using = LocalDateTimeSerializer.class)
+    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
+    private LocalDateTime collectTime;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonSerialize(using = LocalDateTimeSerializer.class)
+    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
+    private LocalDateTime enterTime;
+    private String hash;
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonSerialize(using = LocalDateTimeSerializer.class)
+    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
+    private LocalDateTime updateTime;
+
+    private int showDelete = -1;
+
+    private int pageNum = 1;
+
+    private int pageSize = 10;
+
+    private String orderBy = "collect_time";
+
+}

+ 1 - 1
benyun-core/src/main/java/com/benyun/core/entity/vo/WdInfoVo.java

@@ -46,7 +46,7 @@ public class WdInfoVo {
     private LocalDateTime collectTime;
 
     @TableField("show_delete")
-    private int showDelete;
+    private int showDelete = -1;
 
     int pageNum = 1;
 

+ 15 - 0
benyun-core/src/main/java/com/benyun/core/service/BrandRecycleService.java

@@ -0,0 +1,15 @@
+package com.benyun.core.service;
+
+import com.benyun.core.entity.Brand;
+import com.benyun.core.entity.vo.BrandVo;
+import com.github.pagehelper.PageInfo;
+
+import java.util.List;
+
+public interface BrandRecycleService {
+    public PageInfo<Brand> list(BrandVo brandVo);
+
+    void deleteBrand(String brandId);
+
+    void recoverBrand(String brandId);
+}

+ 41 - 0
benyun-core/src/main/java/com/benyun/core/service/impl/BrandRecycleServiceImpl.java

@@ -0,0 +1,41 @@
+package com.benyun.core.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.benyun.core.dao.BrandMapper;
+import com.benyun.core.entity.Brand;
+import com.benyun.core.entity.vo.BrandVo;
+import com.benyun.core.service.BrandRecycleService;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+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 BrandRecycleServiceImpl implements BrandRecycleService {
+
+    @Autowired
+    BrandMapper brandMapper;
+    @Override
+    public  PageInfo<Brand> list(BrandVo brandVo) {
+        PageHelper.startPage(brandVo.getPageNum(),brandVo.getPageSize());
+        PageHelper.orderBy(brandVo.getOrderBy()+" desc");
+        List<Brand> list = brandMapper.list(brandVo);
+        PageInfo<Brand> brandPageInfo = new PageInfo<>(list);
+        return brandPageInfo;
+    }
+
+    @Override
+    public void deleteBrand(String brandId) {
+        int i = brandMapper.deleteById(brandId);
+        return;
+    }
+
+    @Override
+    public void recoverBrand(String brandId) {
+        brandMapper.recoverBrand(brandId);
+    }
+}

+ 2 - 0
benyun-core/src/main/java/com/benyun/core/service/impl/WdRecycleServiceImpl.java

@@ -13,6 +13,7 @@ import com.github.pagehelper.PageInfo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -20,6 +21,7 @@ import java.util.List;
 import java.util.stream.Collectors;
 
 @Service
+@Transactional
 public class WdRecycleServiceImpl implements WdRecycleService {
 
 

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

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

+ 17 - 0
benyun-core/src/main/resources/mapper/BrandMapper.xml

@@ -83,4 +83,21 @@
             AND cover_city_count <![CDATA[<=]]> #{coverUp}
         </if>
     </select>
+    <select id="list" parameterType="com.benyun.core.entity.vo.BrandVo" resultType="com.benyun.core.entity.Brand">
+        select * from ddt_brand
+        <where>
+            <if test="brandName != null and brandName != ''">
+                and brand_name like concat('%',#{brandName},'%')
+            </if>
+            <if test="showDelete != -1">
+                and show_delete = #{showDelete}
+            </if>
+            <if test="industryCode != null and industryCode != ''">
+                and industry_code = #{industryCode}
+            </if>
+        </where>
+    </select>
+    <update id="recoverBrand" parameterType="java.lang.String" >
+        update ddt_brand set show_delete = 0 where brand_id = #{brand_id}
+    </update>
 </mapper>

+ 1 - 1
benyun-core/src/main/resources/mapper/WdInfoMapper.xml

@@ -88,7 +88,7 @@
             <if test="addrCode != null and addrCode != ''">
                 and addr_code = #{addrCode}
             </if>
-            <if test="showDelete != null">
+            <if test="showDelete != -1">
                 and show_delete = #{showDelete}
             </if>
         </where>

+ 5 - 4
pom.xml

@@ -65,10 +65,7 @@
                 <profiles.active>dev</profiles.active>
                 <logging.level>debug</logging.level>
             </properties>
-            <activation>
-                <!-- 默认环境 -->
-                <activeByDefault>true</activeByDefault>
-            </activation>
+
         </profile>
         <profile>
             <id>prod</id>
@@ -76,6 +73,10 @@
                 <profiles.active>prod</profiles.active>
                 <logging.level>warn</logging.level>
             </properties>
+            <activation>
+                <!-- 默认环境 -->
+                <activeByDefault>true</activeByDefault>
+            </activation>
         </profile>
     </profiles>
 

+ 4 - 4
ruoyi-admin/Dockerfile

@@ -1,6 +1,6 @@
 FROM anapsix/alpine-java:8_server-jre_unlimited
 
-MAINTAINER Lion Li
+MAINTAINER hst
 
 RUN mkdir -p /ruoyi/server/logs \
     /ruoyi/server/temp \
@@ -8,15 +8,15 @@ RUN mkdir -p /ruoyi/server/logs \
 
 WORKDIR /ruoyi/server
 
-ENV SERVER_PORT=8080
+#ENV SERVER_PORT=8080
 
-EXPOSE ${SERVER_PORT}
+#EXPOSE ${SERVER_PORT}
 
 ADD ./target/ruoyi-admin.jar ./app.jar
 
 ENTRYPOINT ["java", \
             "-Djava.security.egd=file:/dev/./urandom", \
-            "-Dserver.port=${SERVER_PORT}", \
+            #"-Dserver.port=${SERVER_PORT}", \
             # 应用名称 如果想区分集群节点监控 改成不同的名称即可
 #            "-Dskywalking.agent.service_name=ruoyi-server", \
 #            "-javaagent:/ruoyi/skywalking/agent/skywalking-agent.jar", \

+ 7 - 6
ruoyi-admin/src/main/resources/application-prod.yml

@@ -52,15 +52,16 @@ spring:
           driverClassName: com.mysql.cj.jdbc.Driver
           # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
           # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
-          url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          url: jdbc:mysql://192.168.2.64:3306/bailian-ai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
           username: root
-          password: root
+          password: benyun
+
         # 从库数据源
         slave:
           lazy: true
           type: ${spring.datasource.type}
           driverClassName: com.mysql.cj.jdbc.Driver
-          url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
+          url: jdbc:mysql://192.168.2.64:3306/bailian-ai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
           username:
           password:
 #        oracle:
@@ -105,13 +106,13 @@ spring:
 spring:
   redis:
     # 地址
-    host: localhost
+    host: 192.168.2.64
     # 端口,默认为6379
     port: 6379
     # 数据库索引
-    database: 0
+    database: 11
     # 密码(如没有密码请注释掉)
-    # password:
+    password: "123456"
     # 连接超时时间
     timeout: 10s
     # 是否开启ssl

+ 2 - 2
ruoyi-extend/ruoyi-monitor-admin/Dockerfile

@@ -1,12 +1,12 @@
 FROM anapsix/alpine-java:8_server-jre_unlimited
 
-MAINTAINER Lion Li
+MAINTAINER hst
 
 RUN mkdir -p /ruoyi/monitor/logs
 
 WORKDIR /ruoyi/monitor
 
-EXPOSE 9090
+#EXPOSE 9090
 
 ADD ./target/ruoyi-monitor-admin.jar ./app.jar
 

+ 4 - 4
ruoyi-extend/ruoyi-xxl-job-admin/Dockerfile

@@ -1,15 +1,15 @@
 FROM anapsix/alpine-java:8_server-jre_unlimited
 
-MAINTAINER Lion Li
+MAINTAINER hst
 
 RUN mkdir -p /ruoyi/xxljob/logs
 
 WORKDIR /ruoyi/xxljob
 
-ENV TZ=PRC
-RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
+#ENV TZ=PRC
+#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
 
-EXPOSE 9100
+#EXPOSE 9100
 
 ADD ./target/ruoyi-xxl-job-admin.jar ./app.jar
 

+ 2 - 2
ruoyi-extend/ruoyi-xxl-job-admin/src/main/resources/application-prod.yml

@@ -14,9 +14,9 @@ spring:
   datasource:
     type: com.zaxxer.hikari.HikariDataSource
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://127.0.0.1:3306/?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://192.168.2.64:3306/bailian-ai?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai
     username: root
-    password: root
+    password: benyun
     hikari:
       auto-commit: true
       connection-test-query: SELECT 1

+ 1 - 1
ruoyi-ui/.env.development

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = RuoYi-Vue-Plus后台管理系统
+VUE_APP_TITLE = 精准营销后台管理系统
 
 # 开发环境配置
 ENV = 'development'

+ 1 - 1
ruoyi-ui/.env.production

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = RuoYi-Vue-Plus后台管理系统
+VUE_APP_TITLE = 精准营销后台管理系统
 
 # 生产环境配置
 ENV = 'production'

+ 1 - 1
ruoyi-ui/package.json

@@ -7,7 +7,7 @@
   "scripts": {
     "dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
     "build:prod": "vue-cli-service build",
-    "preview": "node build/index.js --preview",
+    "preview": "set NODE_OPTIONS=--openssl-legacy-provider && node build/index.js --preview",
     "lint": "eslint --ext .js,.vue src"
   },
   "husky": {

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

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