Pārlūkot izejas kodu

国电山西风机自由分析

xieshengjie 2 gadi atpakaļ
vecāks
revīzija
ae448afbc9

+ 2 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/contant/Contant.java

@@ -6,4 +6,6 @@ package com.gyee.ghost.contant;/*
 public class Contant {
 
     public static String NATURE_UNIFORMCODE = "AI010,AI022,AI130,AI067,AI036,AI198,AI178,FJZT,AI131";
+
+//    public static String FREEDOM_UNIFORMCODE = "AI010,AI022,AI130,AI067,AI036,AI198,AI178,FJZT,AI131";
 }

+ 20 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/controller/FreedomController.java

@@ -0,0 +1,20 @@
+package com.gyee.ghost.controller;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-08-18
+ */
+@RestController
+@RequestMapping("//freedom")
+public class FreedomController {
+
+}

+ 62 - 4
web/gdsx-ghost/src/main/java/com/gyee/ghost/controller/ghost/GhostController.java

@@ -6,16 +6,15 @@ package com.gyee.ghost.controller.ghost;/*
 import com.gyee.common.config.R;
 import com.gyee.common.model.StringUtils;
 import com.gyee.ghost.init.CacheContext;
-import com.gyee.ghost.model.auto.Fanoperation;
-import com.gyee.ghost.model.auto.Nature;
-import com.gyee.ghost.model.auto.Shutdownevent;
-import com.gyee.ghost.model.auto.Windpowerstation;
+import com.gyee.ghost.model.auto.*;
 import com.gyee.ghost.service.auto.GhostService;
 import com.gyee.ghost.vo.NatureVo;
+import com.gyee.ghost.vo.WindturbineVo;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.util.List;
+import java.util.Map;
 
 @RestController
 @RequestMapping("//ghost")
@@ -117,4 +116,63 @@ public class GhostController {
             return R.error().message("访问失败");
         }
     }
+
+    /**
+     * 单机自主分析
+     * 查询所查的测点列表
+     * @return
+     */
+    @GetMapping("/points")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R points(){
+        List<Freedom> resultMap = ghostService.points();
+        if (StringUtils.isNotNull(resultMap)) {
+            return R.ok((long) resultMap.size()).data(resultMap);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    /**
+     * 单机自主分析
+     * 风机列表
+     * @return
+     */
+    @GetMapping("/wtls")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R wtls(){
+        List<WindturbineVo> resultList = ghostService.wtls();
+        if (StringUtils.isNotNull(resultList)) {
+            return R.ok((long) resultList.size()).data(resultList);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+    /**
+     * 单机自由分析
+     * 查询列表
+     * @return
+     */
+    @GetMapping("/freedomList")
+    @ResponseBody
+    @CrossOrigin(origins = "*", maxAge = 3600)
+    public R freedomList(@RequestParam(value = "wtid",required = true)String wtid,
+                         @RequestParam(value = "beginDate",required = true)Long beginDate,
+                         @RequestParam(value = "endDate",required = true)Long endDate,
+                         @RequestParam(value = "interval",required = true)Integer interval,
+                         @RequestParam(value = "uniformcodes",required = true)String uniformcodes) throws Exception {
+        List<Object> resultList = ghostService.freedomList(wtid,beginDate,endDate,interval,uniformcodes);
+        if (StringUtils.isNotNull(resultList)) {
+            return R.ok((long) resultList.size()).data(resultList);
+        }else{
+            return R.error().message("访问失败");
+        }
+    }
+
+
+
+
 }

+ 9 - 4
web/gdsx-ghost/src/main/java/com/gyee/ghost/init/CacheContext.java

@@ -3,10 +3,7 @@ package com.gyee.ghost.init;
 
 
 import com.gyee.common.model.StringUtils;
-import com.gyee.ghost.model.auto.Stoptype;
-import com.gyee.ghost.model.auto.Windpowerstation;
-import com.gyee.ghost.model.auto.Windturbine;
-import com.gyee.ghost.model.auto.Windturbinetestingpointai;
+import com.gyee.ghost.model.auto.*;
 import com.gyee.ghost.service.auto.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -38,6 +35,8 @@ public class CacheContext implements CommandLineRunner {
     private IStoptypeService stoptypeService;
     @Resource
     private IWindturbinetestingpointaiService windturbinetestingpointaiService;
+    @Resource
+    private IFreedomService freedomService;
 
     public static List<Windturbine> wtls = new ArrayList<>();
     public static Map<String,Windturbine> wtmap = new HashMap<>();
@@ -47,6 +46,7 @@ public class CacheContext implements CommandLineRunner {
 
     public static Map<String,Map<String, Windturbinetestingpointai>> wtpAimap = new HashMap();
 
+//    public static Map<String,String> freedomMap = new HashMap<>();
 
     @Override
     public void run(String... args) throws Exception {
@@ -77,5 +77,10 @@ public class CacheContext implements CommandLineRunner {
                 }
             }
         }
+
+//        List<Freedom> freedoms = freedomService.list();
+//        freedoms.stream().forEach(f->{
+//            freedomMap.put(f.getId(),f.getName());
+//        });
     }
 }

+ 16 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/mapper/auto/FreedomMapper.java

@@ -0,0 +1,16 @@
+package com.gyee.ghost.mapper.auto;
+
+import com.gyee.ghost.model.auto.Freedom;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-08-18
+ */
+public interface FreedomMapper extends BaseMapper<Freedom> {
+
+}

+ 26 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/model/auto/Freedom.java

@@ -0,0 +1,26 @@
+package com.gyee.ghost.model.auto;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-08-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class Freedom extends Model {
+
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    private String name;
+
+
+}

+ 85 - 4
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/GhostService.java

@@ -1,18 +1,26 @@
 package com.gyee.ghost.service.auto;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 
+import com.gyee.common.model.PointData;
 import com.gyee.common.model.StringUtils;
 import com.gyee.common.util.CommonUtils;
 import com.gyee.common.util.DateUtils;
 import com.gyee.common.util.DoubleUtils;
 import com.gyee.common.util.SortUtils;
+import com.gyee.common.vo.analysis.DeskObject;
 import com.gyee.ghost.contant.Contant;
 import com.gyee.ghost.init.CacheContext;
 import com.gyee.ghost.model.auto.*;
+import com.gyee.ghost.util.realtimesource.ClassUtil;
 import com.gyee.ghost.util.realtimesource.IEdosUtil;
+import com.gyee.ghost.util.realtimesource.StringUtil;
+import com.gyee.ghost.vo.InitVo;
 import com.gyee.ghost.vo.NatureVo;
+import com.gyee.ghost.vo.WindturbineVo;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.stereotype.Service;
+import springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator;
 
 import javax.annotation.Resource;
 
@@ -36,6 +44,8 @@ public class GhostService {
     private IShutdowneventService shutdowneventService;
     @Resource
     private IEdosUtil edosUtil;
+    @Resource
+    private IFreedomService freedomService;
     /**
      * 存储fanoperation运行分析表
      */
@@ -65,7 +75,7 @@ public class GhostService {
                 Fanoperation fanoperation = new Fanoperation();
                 fanoperation.setId(CommonUtils.getUUID());
                 fanoperation.setWindturbineid(wt.getId());
-                fanoperation.setWindturbinename(wt.getName());
+                fanoperation.setWindturbinename(wt.getCode());
                 fanoperation.setWindpowerstationid(wt.getWindpowerstationid());
                 Optional<Windturbineinfoday> optionalWindturbineinfoday = windturbineinfodayList.stream().filter(w -> w.getWindturbineid().equals(wt.getId())).findFirst();
                 Optional<Windturbineinfoday3> optionalWindturbineinfoday3 = windturbineinfoday3List.stream().filter(w -> w.getWindturbineid().equals(wt.getId())).findFirst();
@@ -132,7 +142,7 @@ public class GhostService {
                 Nature nature = new Nature();
                 nature.setId(CommonUtils.getUUID());
                 nature.setWindturbineid(wt.getId());
-                nature.setWindturbinename(wt.getName());
+                nature.setWindturbinename(wt.getCode());
                 nature.setWindpowerstationid(wt.getWindpowerstationid());
 
                 Optional<Windturbineinfoday> optionalWindturbineinfoday = windturbineinfodayList.stream().filter(w -> w.getWindturbineid().equals(wt.getId())).findFirst();
@@ -258,7 +268,7 @@ public class GhostService {
         shutdowneventList.stream().forEach(shutdownevent->{
             String stoptypeid = shutdownevent.getStoptypeid();
             shutdownevent.setStoptypeid(stopmap.get(stoptypeid));
-            shutdownevent.setWindturbineid(wtmap.get(shutdownevent.getWindturbineid()).getName());
+            shutdownevent.setWindturbineid(wtmap.get(shutdownevent.getWindturbineid()).getCode());
             resultList.add(shutdownevent);
         });
         SortUtils.sort(resultList,"stoptime",SortUtils.DESC);
@@ -295,7 +305,7 @@ public class GhostService {
 
             NatureVo vo = new NatureVo();
             vo.setWindturbineId(wt.getId());
-            vo.setWindturbineName(wtmap.get(wt.getId()).getName());
+            vo.setWindturbineName(wtmap.get(wt.getId()).getCode());
             vo.setWindDirection(wtDataMap.get(wt.getId()+"_AI010"));
             vo.setSpeed(wtDataMap.get(wt.getId()+"_AI022"));
             vo.setPower(wtDataMap.get(wt.getId()+"_AI130"));
@@ -332,4 +342,75 @@ public class GhostService {
         }
         return null;
     }
+
+    public List<Freedom> points() {
+        return freedomService.list();
+    }
+
+
+    public List<Object> freedomList(String wtid, Long beginDate, Long endDate, Integer interval, String uniformcodes) throws Exception {
+        String[] codes = uniformcodes.split(",");
+        Map<String, Map<String, Windturbinetestingpointai>> wtpAimap = CacheContext.wtpAimap;
+
+        Map<String, Windturbinetestingpointai> windturbinetestingpointaiMap = wtpAimap.get(wtid);
+
+
+        List<Object> resultList = new ArrayList<>();
+
+        Map<String,List<PointData>> pointDataMap = new HashMap<>();
+        for (int i =0;i<codes.length;i++){
+            Windturbinetestingpointai windturbinetestingpointai = windturbinetestingpointaiMap.get(StringUtils.upperCase(codes[i]));
+            if (StringUtils.isNotNull(windturbinetestingpointai)){
+                try {
+                    List<PointData> historyDatas = edosUtil.getHistoryDatasSnap(windturbinetestingpointai, beginDate / 1000, endDate / 1000, null, interval * 60l);
+                    pointDataMap.put(codes[i],historyDatas);
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+        }
+
+        List<PointData> pointData = pointDataMap.get(codes[0]);
+        if (StringUtils.isNotNull(pointData)){
+            for (int i = 0;i<pointData.size();i++){
+                InitVo initVo = new InitVo();
+                initVo.setWtid(wtid);
+                initVo.setWtname(CacheContext.wtmap.get(wtid).getCode());
+                LinkedHashMap addMap = new LinkedHashMap();
+                LinkedHashMap addValMap = new LinkedHashMap();
+
+                addMap.put("time", Class.forName("java.lang.Long"));
+                addValMap.put("time", pointData.get(i).getPointTime()*1000);
+
+                for (int j=0;j<codes.length;j++){
+                    addMap.put(StringUtils.upperCase(codes[j]), Class.forName("java.lang.Double"));
+                    addValMap.put(StringUtils.upperCase(codes[j]), DoubleUtils.keepPrecision(pointDataMap.get(codes[j]).get(i).getPointValueInDouble(),2));
+                }
+                Object o = new ClassUtil().dynamicClass(initVo, addMap, addValMap);
+                resultList.add(o);
+            }
+        }
+
+
+        return resultList;
+    }
+
+
+    public List<WindturbineVo> wtls() {
+        List<Windturbine> wtls = CacheContext.wtls;
+        List<Windpowerstation> wpls = CacheContext.wpls;
+        List<WindturbineVo> volist = new ArrayList<>();
+
+        wpls.stream().forEach(wp->{
+            WindturbineVo vo = new WindturbineVo();
+            vo.setId(wp.getId());
+            vo.setCode(wp.getName());
+            List<Windturbine> windturbines = wtls.stream().filter(wt -> wt.getWindpowerstationid().equals(wp.getId())).collect(Collectors.toList());
+            vo.setData(windturbines);
+            volist.add(vo);
+        });
+
+        return volist;
+    }
 }

+ 16 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/IFreedomService.java

@@ -0,0 +1,16 @@
+package com.gyee.ghost.service.auto;
+
+import com.gyee.ghost.model.auto.Freedom;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-08-18
+ */
+public interface IFreedomService extends IService<Freedom> {
+
+}

+ 20 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/service/auto/impl/FreedomServiceImpl.java

@@ -0,0 +1,20 @@
+package com.gyee.ghost.service.auto.impl;
+
+import com.gyee.ghost.model.auto.Freedom;
+import com.gyee.ghost.mapper.auto.FreedomMapper;
+import com.gyee.ghost.service.auto.IFreedomService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 谢生杰
+ * @since 2022-08-18
+ */
+@Service
+public class FreedomServiceImpl extends ServiceImpl<FreedomMapper, Freedom> implements IFreedomService {
+
+}

+ 63 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/util/realtimesource/ClassUtil.java

@@ -0,0 +1,63 @@
+package com.gyee.ghost.util.realtimesource;
+
+
+import com.gyee.common.vo.analysis.DynamicBean;
+
+import java.beans.BeanInfo;
+import java.beans.Introspector;
+import java.beans.PropertyDescriptor;
+import java.lang.reflect.Method;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Set;
+
+/**
+ * @ClassName : ClassUtil
+ * @Author : xieshengjie
+ * @Date: 2021/3/8 17:16
+ * @Description : 动态添加属性
+ */
+public class ClassUtil {
+    /**
+     *
+     * @param object   旧的对象带值
+     * @param addMap   动态需要添加的属性和属性类型
+     * @param addValMap  动态需要添加的属性和属性值
+     * @return  新的对象
+     * @throws Exception
+     */
+    public static Object dynamicClass(Object object, LinkedHashMap addMap, LinkedHashMap addValMap) throws Exception {
+        LinkedHashMap returnMap = new LinkedHashMap();
+        LinkedHashMap typeMap = new LinkedHashMap();
+
+
+        Class<?> type = object.getClass();
+        BeanInfo beanInfo = Introspector.getBeanInfo(type);
+        PropertyDescriptor[] propertyDescriptors = beanInfo.getPropertyDescriptors();
+        for (int i = 0; i < propertyDescriptors.length; i++) {
+            PropertyDescriptor descriptor = propertyDescriptors[i];
+            String propertyName = descriptor.getName();
+            if (!propertyName.equals("class")) {
+                Method readMethod = descriptor.getReadMethod();
+                Object result = readMethod.invoke(object);
+                //可以判断为 NULL不赋值
+                returnMap.put(propertyName, result);
+                typeMap.put(propertyName, descriptor.getPropertyType());
+            }
+        }
+
+        returnMap.putAll(addValMap);
+        typeMap.putAll(addMap);
+        //map转换成实体对象
+        DynamicBean bean = new DynamicBean(typeMap);
+        //赋值
+        Set keys = typeMap.keySet();
+        for (Iterator it = keys.iterator(); it.hasNext(); ) {
+            String key = (String) it.next();
+            bean.setValue(key, returnMap.get(key));
+        }
+        Object obj = bean.getObject();
+        return obj;
+    }
+
+}

+ 3 - 1
web/gdsx-ghost/src/main/java/com/gyee/ghost/util/realtimesource/EdosUtil.java

@@ -26,9 +26,11 @@ import java.util.*;
 public class EdosUtil implements IEdosUtil {
 
     private RestTemplate restTemplate =new RestTemplate();
-    private static String baseURL = "http://11.0.118.58:8011/ts";
+//    private static String baseURL = "http://11.0.118.58:8011/ts";
 //    private static String baseURL = "http://10.155.32.4:8011/ts";
 //    private static String baseURL = "http://10.65.79.30:8019/ts";
+    @Value("${db.url}")
+    private String baseURL;
     @Override
     public PointData getRealData(Windpowerstationtestingpoint point) throws Exception {
         try {

+ 14 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/vo/InitVo.java

@@ -0,0 +1,14 @@
+package com.gyee.ghost.vo;/*
+@author   谢生杰
+@date   2022/8/18-10:07
+*/
+
+import lombok.Data;
+
+@Data
+public class InitVo {
+
+    private String wtid;
+
+    private String wtname;
+}

+ 16 - 0
web/gdsx-ghost/src/main/java/com/gyee/ghost/vo/WindturbineVo.java

@@ -0,0 +1,16 @@
+package com.gyee.ghost.vo;/*
+@author   谢生杰
+@date   2022/8/18-16:52
+*/
+
+import com.gyee.ghost.model.auto.Windturbine;
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class WindturbineVo {
+    private String id;
+    private String code;
+    private List<Windturbine> data;
+}

+ 11 - 11
web/gdsx-ghost/src/main/resources/application-dev.yml

@@ -44,23 +44,23 @@ spring:
     exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
   datasource:
     type: com.alibaba.druid.pool.DruidDataSource
-    #    driver-class-name: oracle.jdbc.OracleDriver
-    #    #外网
-    #    url: jdbc:oracle:thin:@11.0.118.57:1521:gdsj
-    #    username: gdprod
-    #    password: gd123
-    #    oracle-schema=:
+    driver-class-name: oracle.jdbc.OracleDriver
+    #外网
+    url: jdbc:oracle:thin:@11.0.118.57:1521:gdsj
+    username: gdprod
+    password: gd123
+    oracle-schema=:
 
     #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
     #    username: root
     #    password: root
     #    driver-class-name: com.mysql.jdbc.Driver
 
-    driver-class-name: org.postgresql.Driver
-    url: jdbc:postgresql://10.81.3.151:5432/wisdom
-    username: gdprod
-    password: gd123
-    oracle-schema=:
+    #    driver-class-name: org.postgresql.Driver
+    #    url: jdbc:postgresql://10.81.3.151:5432/wisdom
+    #    username: gdprod
+    #    password: gd123
+    #    oracle-schema=:
 
     druid:
       max-active: 20

+ 107 - 0
web/gdsx-ghost/src/main/resources/application-test.yml

@@ -0,0 +1,107 @@
+server:
+  port: 8082
+  servlet:
+    context-path: /
+
+
+spring:
+  application:
+    name:
+  main:
+    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
+  #  cloud:
+  #    nacos:
+  #      discovery:
+  #        server-addr: 192.168.2.216:8848
+  #        #指定yaml格式的配置
+  #        file-extension: yaml
+  #        cluster-name: master
+  #      username: nacos
+  #      password: nacos
+  #redis集群
+  redis:
+    #    host: 10.83.68.94
+    host: 10.81.3.155
+    port: 6379
+    timeout: 100000
+    #    集群环境打开下面注释,单机不需要打开
+    #    cluster:
+    #      集群信息
+    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
+    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
+    #      maxRedirects: 3
+    password:
+    application:
+      name: test
+    jedis:
+      pool:
+        max-active: 8
+        min-idle: 0
+        max-idle: 8
+        max-wait: -1
+    database: 1
+  autoconfigure:
+    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+  datasource:
+    type: com.alibaba.druid.pool.DruidDataSource
+    driver-class-name: org.postgresql.Driver
+    url: jdbc:postgresql://10.81.3.151:5432/wisdom
+    username: gdprod
+    password: gd123
+    oracle-schema=:
+
+    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
+    #    username: root
+    #    password: root
+    #    driver-class-name: com.mysql.jdbc.Driver
+
+    #    driver-class-name: org.postgresql.Driver
+    #    url: jdbc:postgresql://10.81.3.151:5432/wisdom
+    #    username: gdprod
+    #    password: gd123
+    #    oracle-schema=:
+
+    druid:
+      max-active: 20
+      initial-size: 1
+      min-idle: 3
+      max-wait: 60000
+      time-between-eviction-runs-millis: 60000
+      min-evictable-idle-time-millis: 300000
+      test-while-idle: true
+      test-on-borrow: false
+      test-on-return: false
+  servlet:
+    multipart:
+      # 开启 multipart 上传功能
+      enabled: true
+      # 文件写入磁盘的阈值
+      file-size-threshold: 2KB
+      # 最大文件大小
+      max-file-size: 200MB
+      # 最大请求大小
+      max-request-size: 215MB
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+    auto-mapping-behavior: full
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  mapper-locations: classpath*:mapper/**/*Mapper.xml
+  global-config:
+    # 逻辑删除配置
+    db-config:
+      id-type: auto
+      # 删除前
+      logic-not-delete-value: 1
+      # 删除后
+      logic-delete-value: 0
+logging:
+  level:
+    root: info
+    com.example: debug
+#db url
+db:
+  url: http://10.81.3.154:8011/ts
+
+

+ 2 - 107
web/gdsx-ghost/src/main/resources/application.yml

@@ -1,108 +1,3 @@
-server:
-  port: 8082
-  servlet:
-    context-path: /
-
-
 spring:
-  application:
-    name:
-  main:
-    allow-bean-definition-overriding: true #当遇到同样名字的时候,是否允许覆盖注册
-  #  cloud:
-  #    nacos:
-  #      discovery:
-  #        server-addr: 192.168.2.216:8848
-  #        #指定yaml格式的配置
-  #        file-extension: yaml
-  #        cluster-name: master
-  #      username: nacos
-  #      password: nacos
-  #redis集群
-  redis:
-    #    host: 10.83.68.94
-    host: 11.0.118.57
-    port: 6379
-    timeout: 100000
-    #    集群环境打开下面注释,单机不需要打开
-    #    cluster:
-    #      集群信息
-    #      nodes: xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx,xxx.xxx.xxx.xxx:xxxx
-    #      #默认值是5 一般当此值设置过大时,容易报:Too many Cluster redirections
-    #      maxRedirects: 3
-    password:
-    application:
-      name: test
-    jedis:
-      pool:
-        max-active: 8
-        min-idle: 0
-        max-idle: 8
-        max-wait: -1
-    database: 1
-  autoconfigure:
-    exclude: org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
-  datasource:
-    type: com.alibaba.druid.pool.DruidDataSource
-    driver-class-name: oracle.jdbc.OracleDriver
-    #外网
-    url: jdbc:oracle:thin:@11.0.118.57:1521:gdsj
-    username: gdprod
-    password: gd123
-    oracle-schema=:
-
-    #    url: jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8&serverTimezone=UTC
-    #    username: root
-    #    password: root
-    #    driver-class-name: com.mysql.jdbc.Driver
-
-#    driver-class-name: org.postgresql.Driver
-#    url: jdbc:postgresql://10.81.3.151:5432/wisdom
-#    username: gdprod
-#    password: gd123
-#    oracle-schema=:
-
-    druid:
-      max-active: 20
-      initial-size: 1
-      min-idle: 3
-      max-wait: 60000
-      time-between-eviction-runs-millis: 60000
-      min-evictable-idle-time-millis: 300000
-      test-while-idle: true
-      test-on-borrow: false
-      test-on-return: false
-  servlet:
-    multipart:
-      # 开启 multipart 上传功能
-      enabled: true
-      # 文件写入磁盘的阈值
-      file-size-threshold: 2KB
-      # 最大文件大小
-      max-file-size: 200MB
-      # 最大请求大小
-      max-request-size: 215MB
-
-mybatis-plus:
-  configuration:
-    map-underscore-to-camel-case: true
-    auto-mapping-behavior: full
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-  mapper-locations: classpath*:mapper/**/*Mapper.xml
-  global-config:
-    # 逻辑删除配置
-    db-config:
-      id-type: auto
-      # 删除前
-      logic-not-delete-value: 1
-      # 删除后
-      logic-delete-value: 0
-logging:
-  level:
-    root: info
-    com.example: debug
-#db url
-db:
-  url: http://11.0.118.58:8011/ts
-
-
+  profiles:
+    active: dev