Browse Source

项目配置文件调整以及飞书接口对接完成

hcst_sunzhen 5 năm trước cách đây
mục cha
commit
ab787deb89

+ 4 - 0
pom.xml

@@ -173,6 +173,10 @@
             <artifactId>spring-boot-starter-data-redis</artifactId>
         </dependency>
         <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-pool2</artifactId>
+        </dependency>
+        <dependency>
             <groupId>commons-lang</groupId>
             <artifactId>commons-lang</artifactId>
             <version>2.6</version>

+ 2 - 1
src/main/java/cn/com/ctop/okr/Application.java

@@ -6,6 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.context.ConfigurableApplicationContext;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
 import org.springframework.core.env.Environment;
 
 import java.net.InetAddress;
@@ -22,7 +23,7 @@ public class Application {
         String port = env.getProperty("server.port");
         String path = env.getProperty("server.servlet.context-path");
         log.info("\n----------------------------------------------------------\n\t" +
-                "track service is running\n\t" +
+                "okr service is running\n\t" +
                 "----------------------------------------------------------");
     }
 }

+ 3 - 0
src/main/java/cn/com/ctop/okr/config/ShiroConfig.java

@@ -147,6 +147,9 @@ public class ShiroConfig {
         //filterChainDefinitionMap.put("/ctop/performance/show/**", "anon");
         filterChainDefinitionMap.put("/job/test/*", "anon");
 
+        filterChainDefinitionMap.put("/corp/*", "anon");
+
+
         // 添加自己的过滤器并且取名为jwt
         Map<String, Filter> filterMap = new HashMap<>(1);
         filterMap.put("jwt", new JwtFilter());

+ 5 - 5
src/main/java/cn/com/ctop/okr/entity/CorpDepartInfo.java

@@ -10,10 +10,10 @@ import lombok.Data;
 public class CorpDepartInfo {
     @TableId(value = "id",type = IdType.AUTO)
     private Long id;
-    private String department_id;
-    private String department_name;
-    private String open_department_id;
-    private String parent_id;
-    private String parent_open_department_id;
+    private String departmentId;
+    private String departmentName;
+    private String openDepartmentId;
+    private String parentId;
+    private String parentOpenDepartmentId;
 
 }

+ 2 - 2
src/main/java/cn/com/ctop/okr/entity/CorpUserInfo.java

@@ -14,14 +14,14 @@ public class CorpUserInfo {
     private Long id;
     private String openId;
     private String name;
-    private String name_py;
+    private String namePy;
     private String email;
     private String mobile;
     private Integer status;
     private String employeeId;
     private String employeeNo;
     private Integer employeeType;
-    private String union_id;
+    private String unionId;
     private Integer isTenantManager;
     private String enName;
     private Integer gender;

+ 20 - 12
src/main/java/cn/com/ctop/okr/feishu/provider/DepartmentProvider.java

@@ -17,7 +17,7 @@ public class DepartmentProvider {
      * @return
      * @throws Exception
      */
-    public static void getDepartSimpleList(String department_id, String page_token) throws Exception {
+    public static JSONObject getDepartSimpleList(String department_id, String page_token) throws Exception {
         Map<String,String> headers = new HashMap<>();
         TreeMap<String,Object> params = new TreeMap<>();
         headers.put("Authorization","Bearer "+ AuthProvider.getAppAccessToken());
@@ -32,14 +32,21 @@ public class DepartmentProvider {
         JSONObject resultJson = JSONObject.parseObject(resultStr);
         System.out.println(resultJson);
 
-        Boolean hasMore = resultJson.getJSONObject("data").getBoolean("has_more");
-        if(hasMore == true){
-            String pageToken = resultJson.getString("page_token");
-            getDepartSimpleList(department_id, pageToken);
-        }
+        //Boolean hasMore = resultJson.getJSONObject("data").getBoolean("has_more");
+        //if(hasMore == true){
+        //    String pageToken = resultJson.getString("page_token");
+        //    getDepartSimpleList(department_id, pageToken);
+        //}
+        return resultJson;
     }
 
-    public static void getDepartmentUserDetailList(String department_id, String page_token) throws Exception {
+    /**
+     * 根据部门获取部门下所有员工详细信息
+     * @param department_id
+     * @param page_token
+     * @throws Exception
+     */
+    public static JSONObject getDepartmentUserDetailList(String department_id, String page_token) throws Exception {
         Map<String,String> headers = new HashMap<>();
         TreeMap<String,Object> params = new TreeMap<>();
         headers.put("Authorization","Bearer "+ AuthProvider.getAppAccessToken());
@@ -54,11 +61,12 @@ public class DepartmentProvider {
         JSONObject resultJson = JSONObject.parseObject(resultStr);
         System.out.println(resultJson);
 
-        Boolean hasMore = resultJson.getJSONObject("data").getBoolean("has_more");
-        if(hasMore == true){
-            String pageToken = resultJson.getString("page_token");
-            getDepartmentUserDetailList(department_id, pageToken);
-        }
+        //Boolean hasMore = resultJson.getJSONObject("data").getBoolean("has_more");
+        //if(hasMore == true){
+        //    String pageToken = resultJson.getString("page_token");
+        //    getDepartmentUserDetailList(department_id, pageToken);
+        //}
+        return resultJson;
     }
 
 

+ 7 - 2
src/main/java/cn/com/ctop/okr/mapper/CorpDepartInfoMapper.java

@@ -1,7 +1,7 @@
 package cn.com.ctop.okr.mapper;
 
 import cn.com.ctop.okr.entity.CorpDepartInfo;
-import cn.com.ctop.okr.entity.CorpUserInfo;
+import cn.com.ctop.okr.entity.CorpUserDepartMap;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
 
@@ -9,9 +9,14 @@ import java.util.List;
 
 public interface CorpDepartInfoMapper extends BaseMapper<CorpDepartInfo> {
 
-
     List<CorpDepartInfo> queryUserDeparts(@Param("openId")String openId);
 
+    void deleteUserDepartMapByOpenId(@Param("openId")String openId);
+
+    void insertUserDepartMapList(@Param("userDepartMapList")List<CorpUserDepartMap> userDepartMapList);
+
+    void replaceInfoDepartInfo(@Param("departInfo")CorpDepartInfo departInfo);
 
+    List<String> getCorpDepartIdList();
 
 }

+ 2 - 1
src/main/java/cn/com/ctop/okr/mapper/CorpUserInfoMapper.java

@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
 
 public interface CorpUserInfoMapper extends BaseMapper<CorpUserInfo> {
 
-
     CorpUserInfo getUserInfoByOpenId(@Param("openId")String openId);
+
+    void replaceInfoUserInfo(@Param("user")CorpUserInfo userInfo);
 }

+ 58 - 0
src/main/java/cn/com/ctop/okr/mapper/xml/CorpUserInfoMapper.xml

@@ -12,6 +12,64 @@
 
     </select>
 
+    <insert id="replaceInfoUserInfo">
+        replace into
+        feishu_corp_user_info
+        (
+            open_id,
+            name,
+            name_py,
+            email,
+            mobile,
+            status,
+            employee_id,
+            employee_no,
+            employee_type,
+            union_id,
+            is_tenant_manager,
+            en_name,
+            gender,
+            avatar_url,
+            avatar_72,
+            avatar_240,
+            avatar_640,
+            country,
+            city,
+            work_station,
+            leader_employee_id,
+            leader_open_id,
+            leader_union_id,
+            user_update_time
+        )
+        values
+        (
+            #{user.openId},
+            #{user.name},
+            #{user.namePy},
+            #{user.email},
+            #{user.mobile},
+            #{user.status},
+            #{user.employeeId},
+            #{user.employeeNo},
+            #{user.employeeType},
+            #{user.unionId},
+            #{user.isTenantManager},
+            #{user.enName},
+            #{user.gender},
+            #{user.avatarUrl},
+            #{user.avatar72},
+            #{user.avatar240},
+            #{user.avatar640},
+            #{user.country},
+            #{user.city},
+            #{user.workStation},
+            #{user.leaderEmployeeId},
+            #{user.leaderOpenId},
+            #{user.leaderUnionId},
+            #{user.userUpdateTime}
+        )
+    </insert>
+
 
 
 </mapper>

+ 53 - 0
src/main/java/cn/com/ctop/okr/mapper/xml/DepartUserInfoMapper.xml

@@ -13,4 +13,57 @@
         open_id = #{openId}
     </select>
 
+    <!-- 根据openId删除其对应部门 -->
+    <delete id="deleteUserDepartMapByOpenId">
+        delete
+        from
+        feishu_corp_user_depart_map
+        where
+        open_id = #{openId}
+    </delete>
+
+    <insert id="insertUserDepartMapList">
+        insert into
+        feishu_corp_user_depart_map
+        (
+            open_id,
+            department_id
+        )
+        values
+        <foreach collection="userDepartMapList" item="map" separator=",">
+        (
+            #{map.openId},
+            #{map.departmentId}
+        )
+        </foreach>
+
+    </insert>
+
+    <insert id="replaceInfoDepartInfo">
+        replace into
+        feishu_corp_depart_info
+        (
+            department_id,
+            department_name,
+            open_department_id,
+            parent_id,
+            parent_open_department_id
+        )
+        values
+        (
+            #{departInfo.departmentId},
+            #{departInfo.departmentName},
+            #{departInfo.openDepartmentId},
+            #{departInfo.parentId},
+            #{departInfo.parentOpenDepartmentId}
+        )
+    </insert>
+
+    <select id="getCorpDepartIdList" resultType="string">
+        select
+        department_id
+        from
+        feishu_corp_depart_info
+    </select>
+
 </mapper>

+ 2 - 0
src/main/java/cn/com/ctop/okr/service/CorpUserInfoService.java

@@ -12,4 +12,6 @@ public interface CorpUserInfoService extends IService<CorpUserInfo> {
 
     CorpUserInfo getUserInfoByOpenId(String openId);
 
+    void loadFeishuDepartAndUserInfo() throws Exception;
+
 }

+ 139 - 2
src/main/java/cn/com/ctop/okr/service/impl/CorpUserInfoServiceImpl.java

@@ -1,18 +1,28 @@
 package cn.com.ctop.okr.service.impl;
 
 import cn.com.ctop.okr.entity.CorpDepartInfo;
+import cn.com.ctop.okr.entity.CorpUserDepartMap;
 import cn.com.ctop.okr.entity.CorpUserInfo;
+import cn.com.ctop.okr.feishu.provider.DepartmentProvider;
 import cn.com.ctop.okr.mapper.CorpDepartInfoMapper;
 import cn.com.ctop.okr.mapper.CorpUserInfoMapper;
 import cn.com.ctop.okr.service.CorpUserInfoService;
+import cn.com.ctop.okr.utils.Check;
+import cn.com.ctop.okr.utils.DateUtils;
+import cn.com.ctop.okr.vo.UserDepartMap;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.List;
 
 @Service
+@Slf4j
 public class CorpUserInfoServiceImpl extends ServiceImpl<CorpUserInfoMapper, CorpUserInfo> implements CorpUserInfoService {
 
     @Autowired
@@ -25,13 +35,140 @@ public class CorpUserInfoServiceImpl extends ServiceImpl<CorpUserInfoMapper, Cor
         return corpDepartInfoMapper.queryUserDeparts(openId);
     }
 
-    public CorpUserInfo saveUserInfo(String openId){
+    /**
+     * 获取飞书公司部门和员工信息
+     * @throws Exception
+     */
+    @Override
+    public void loadFeishuDepartAndUserInfo() throws Exception {
+        log.info("获取飞书公司部门列表开始");
+        //同步飞书部门列表
+        loadFeishuDepartInfo("0", null);
+        log.info("获取飞书公司部门列表结束");
+        log.info("获取飞书公司员工信息开始");
+        loadFeishuUserInfoByDepartId();
+        log.info("获取飞书公司员工信息结束");
+    }
+
+    private void loadFeishuDepartInfo(String department_id, String page_token) throws Exception {
+        JSONObject resultJson = DepartmentProvider.getDepartSimpleList(department_id,null);
+        Integer code = resultJson.getInteger("code");
+        if(code != 0){
+            //log.error("部门列表返回不成功,返回为:{}",resultJson.getString("msg"));
+            throw new Exception("部门列表返回不成功,返回为:" + resultJson);
+        }
+
+        JSONObject dataJson = resultJson.getJSONObject("data");
+        if(Check.isNull(dataJson)){
+            throw new Exception("部门列表返回不成功,返回为:" + resultJson);
+        }
+        JSONArray departmentInfos = dataJson.getJSONArray("department_infos");
+        int size = departmentInfos.size();
+
+        for(int i=0; i<size; i++){
+            JSONObject departmentInfo = departmentInfos.getJSONObject(i);
+            CorpDepartInfo departInfo = new CorpDepartInfo();
+            departInfo.setDepartmentId(departmentInfo.getString("id"));
+            departInfo.setDepartmentName(departmentInfo.getString("name"));
+            departInfo.setOpenDepartmentId(departmentInfo.getString("parent_open_department_id"));
+            departInfo.setParentId(departmentInfo.getString("parent_id"));
+            departInfo.setParentOpenDepartmentId(departmentInfo.getString("parent_open_department_id"));
 
+            corpDepartInfoMapper.replaceInfoDepartInfo(departInfo);
+        }
 
+        Boolean hasMore = dataJson.getBoolean("has_more");
+        if(hasMore){
+            String pageToken = dataJson.getString("page_token");
+            loadFeishuDepartInfo(department_id, pageToken);
+        }
+    }
 
-        return null;
+    private void loadFeishuUserInfoByDepartId(){
+        List<String> departIdList = corpDepartInfoMapper.getCorpDepartIdList();
+        for (String departId:departIdList){
+            try {
+                loadFeishuUserInfo(departId,null);
+            }catch (Exception e){
+                log.error(e.getMessage());
+            }
+        }
     }
 
+    private void loadFeishuUserInfo(String department_id, String page_token) throws Exception {
+        JSONObject resultJson = DepartmentProvider.getDepartmentUserDetailList(department_id, page_token);
+
+        Integer code = resultJson.getInteger("code");
+        if(code != 0){
+            throw new Exception("飞书部门员工明细返回不成功,返回为:" + resultJson);
+        }
+
+        JSONObject dataJson = resultJson.getJSONObject("data");
+        if (Check.isNull(dataJson)){
+            throw new Exception("飞书部门员工明细返回不成功,返回为:" + resultJson);
+        }
+
+        JSONArray userInfoArray = dataJson.getJSONArray("user_infos");
+        int size = userInfoArray.size();
+        for(int i=0; i<size; i++){
+            JSONObject userJson = userInfoArray.getJSONObject(i);
+            //数据入库
+            CorpUserInfo user = new CorpUserInfo();
+            String openId = userJson.getString("open_id");
+
+            user.setAvatar72(userJson.getString("avatar_72"));
+            user.setAvatar240(userJson.getString("avatar_240"));
+            user.setAvatar640(userJson.getString("avatar_640"));
+            user.setAvatarUrl(userJson.getString("avatar_url"));
+            user.setCity(userJson.getString("city"));
+            user.setCountry(userJson.getString("country"));
+            user.setEmail(userJson.getString("email"));
+            user.setEmployeeId(userJson.getString("employee_id"));
+            user.setEmployeeNo(userJson.getString("employee_no"));
+            user.setEmployeeType(userJson.getInteger("employee_type"));
+            user.setEnName(userJson.getString("en_name"));
+            user.setGender(userJson.getInteger("gender"));
+            user.setIsTenantManager(userJson.getBoolean("is_tenant_manager")==true?1:0);
+            user.setLeaderEmployeeId(userJson.getString("leader_employee_id"));
+            user.setLeaderOpenId(userJson.getString("leader_open_id"));
+            user.setLeaderUnionId(userJson.getString("leader_union_id"));
+            user.setMobile(userJson.getString("mobile"));
+            user.setName(userJson.getString("name"));
+            user.setNamePy(userJson.getString("name_py"));
+            user.setOpenId(openId);
+            user.setUnionId(userJson.getString("union_id"));
+            user.setStatus(userJson.getInteger("status"));
+            user.setUserUpdateTime(DateUtils.timeStampToDate(userJson.getLong("update_time") * 1000));
+            user.setWorkStation(userJson.getString("work_station"));
+
+            corpUserInfoMapper.replaceInfoUserInfo(user);
+
+
+            //员工部门关联表入库
+            JSONArray departListArray = userJson.getJSONArray("departments");
+            corpDepartInfoMapper.deleteUserDepartMapByOpenId(openId);
+            List<CorpUserDepartMap> userDepartMapList = new ArrayList<>();
+            int departListArraySize = departListArray.size();
+            for(int j=0; j<departListArraySize; j++){
+                CorpUserDepartMap map = new CorpUserDepartMap();
+                String departmentId = departListArray.getString(j);
+                map.setDepartmentId(departmentId);
+                map.setOpenId(openId);
+                userDepartMapList.add(map);
+            }
+            corpDepartInfoMapper.insertUserDepartMapList(userDepartMapList);
+        }
+
+        Boolean hasMore = resultJson.getJSONObject("data").getBoolean("has_more");
+        if(hasMore){
+            String pageToken = resultJson.getJSONObject("data").getString("page_token");
+            loadFeishuUserInfo(department_id,pageToken);
+        }
+
+    }
+
+
+    @Override
     public CorpUserInfo getUserInfoByOpenId(String openId){
         return corpUserInfoMapper.getUserInfoByOpenId(openId);
     }

+ 201 - 17
src/main/resources/application.yml

@@ -1,8 +1,8 @@
 server:
-  port: 8803
-  ip: 127.0.0.1
+  port: 8910
+  #ip: 127.0.0.1
   servlet:
-    context-path: /
+    context-path: /okr
     compression:
       enabled: true
       mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
@@ -46,12 +46,6 @@ spring:
   autoconfigure:
     exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
   datasource:
-#    name: fendo
-#    url: jdbc:mysql://39.97.120.42:3306/track?characterEncoding=UTF-8&useUnicode=true&useSSL=false
-#    username: hcst
-#    password: test@20190531
-    type: com.alibaba.druid.pool.DruidDataSource
-    driver-class-name: com.mysql.jdbc.Driver
     dynamic:
       druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
         # 连接池的配置信息
@@ -80,19 +74,29 @@ spring:
         connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
       datasource:
         master:
-          url: jdbc:mysql://172.30.0.4:3306/track?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+          url: jdbc:mysql://39.106.184.70:3306/okr?characterEncoding=UTF-8&useUnicode=true&useSSL=false
           username: hcst
           password: test@20190531
           driver-class-name: com.mysql.jdbc.Driver
-          # 多数据源配置
-          #multi-datasource1:
-#          url: jdbc:mysql://39.106.184.70:3306/track?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true
-#          username: hcst
-#          password: test@20190531
-#          driver-class-name: com.mysql.jdbc.Driver
+
+  #redis 配置
+  redis:
+    database: 0
+    host: 127.0.0.1
+    lettuce:
+      pool:
+        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+      shutdown-timeout: 100ms
+    #password: foobared
+    port: 6379
+
+
 #mybatis plus 设置
 mybatis-plus:
-  mapper-locations: classpath*:classpath*:cn/com/ctop/**/xml/*Mapper.xml
+  mapper-locations: classpath*:cn/com/ctop/**/xml/*Mapper.xml
   global-config:
     # 关闭MP3.0自带的banner
     banner: false
@@ -104,9 +108,189 @@ mybatis-plus:
     configuration:
       # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
       log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+#      configuration:
+#        #  map-underscore-to-camel-case: false
+#        log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
 
 logging:
   level:
     root: info
   config: classpath:logback-dev.xml
 
+
+
+
+
+
+
+#
+#server:
+#  port: 8088
+#  servlet:
+#    context-path: /jeecg-boot
+#    compression:
+#      enabled: true
+#      mime-types: application/javascript,application/json,application/xml,text/html,text/xml,text/plain,text/css,image/*
+#
+#management:
+#  endpoints:
+#    web:
+#      exposure:
+#        include: metrics,httptrace
+#
+#spring:
+#  servlet:
+#    multipart:
+#      max-file-size: -1
+#      max-request-size: -1
+#  mail:
+#    host: smtp.163.com
+#    username: jeecgos@163.com
+#    password: ??
+#    properties:
+#      mail:
+#        smtp:
+#          auth: true
+#          starttls:
+#            enable: true
+#            required: true
+#  ## quartz定时任务,采用数据库方式
+#  #json 时间戳统一转换
+#  jackson:
+#    date-format:   yyyy-MM-dd HH:mm:ss
+#    time-zone:   GMT+8
+#  aop:
+#    proxy-target-class: true
+#  #配置freemarker
+#  #配置freemarker
+#  freemarker:
+#    # 设置模板后缀名
+#    suffix: .ftl
+#    # 设置文档类型
+#    content-type: text/html
+#    # 设置页面编码格式
+#    charset: UTF-8
+#    # 设置页面缓存
+#    cache: false
+#    prefer-file-system-access: false
+#    # 设置ftl文件路径
+#    template-loader-path:
+#      - classpath:/templates
+#  # 设置静态文件路径,js,css等
+#  mvc:
+#    static-path-pattern: /**
+#  resource:
+#    static-locations: classpath:/static/,classpath:/public/
+#  autoconfigure:
+#    exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure
+#  datasource:
+#    druid:
+#      stat-view-servlet:
+#        enabled: true
+#        loginUsername: admin
+#        loginPassword: 123456
+#      web-stat-filter:
+#        enabled: true
+#    dynamic:
+#      druid: # 全局druid参数,绝大部分值和默认保持一致。(现已支持的参数如下,不清楚含义不要乱设置)
+#        # 连接池的配置信息
+#        # 初始化大小,最小,最大
+#        connection-init-sql: set names utf8mb4
+#
+#        initial-size: 5
+#        min-idle: 5
+#        maxActive: 20
+#        # 配置获取连接等待超时的时间
+#        maxWait: 60000
+#        # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+#        timeBetweenEvictionRunsMillis: 60000
+#        # 配置一个连接在池中最小生存的时间,单位是毫秒
+#        minEvictableIdleTimeMillis: 300000
+#        validationQuery: SELECT 1 FROM DUAL
+#        testWhileIdle: true
+#        testOnBorrow: false
+#        testOnReturn: false
+#        # 打开PSCache,并且指定每个连接上PSCache的大小
+#        poolPreparedStatements: true
+#        maxPoolPreparedStatementPerConnectionSize: 20
+#        # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+#        filters: stat,slf4j
+#        # 通过connectProperties属性来打开mergeSql功能;慢SQL记录
+#        connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
+#      #      datasource:
+#      #        master:
+#      #          url: jdbc:mysql://39.106.184.70:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+#      #          username: hcst
+#      #          password: test@20190531
+#      datasource:
+#        master:
+#          url: jdbc:mysql://139.186.27.96:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false
+#          username: hcst
+#          password: test@20190531
+#          driver-class-name: com.mysql.jdbc.Driver
+#  #redis 配置
+#  redis:
+#    database: 0
+#    host: 127.0.0.1
+#    lettuce:
+#      pool:
+#        max-active: 8   #最大连接数据库连接数,设 0 为没有限制
+#        max-idle: 8     #最大等待连接中的数量,设 0 为没有限制
+#        max-wait: -1ms  #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
+#        min-idle: 0     #最小等待连接中的数量,设 0 为没有限制
+#      shutdown-timeout: 100ms
+#    password: ''
+#    port: 6379
+##mybatis plus 设置
+#mybatis-plus:
+#  mapper-locations: classpath*:org/jeecg/modules/**/xml/*Mapper.xml,classpath*:cn/com/ctop/**/xml/*Mapper.xml
+#  global-config:
+#    # 关闭MP3.0自带的banner
+#    banner: false
+#    db-config:
+#      #主键类型  0:"数据库ID自增",1:"该类型为未设置主键类型", 2:"用户输入ID",3:"全局唯一ID (数字类型唯一ID)", 4:"全局唯一ID UUID",5:"字符串全局唯一ID (idWorker 的字符串表示)";
+#      id-type: 4
+#      # 默认数据库表下划线命名
+#      table-underline: true
+#  configuration:
+#    #  map-underscore-to-camel-case: false
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+#  #分页pageHelper
+#pagehelper:
+#  helper-dialect: mysql
+#  reasonable: true
+#  support-methods-arguments: true
+##jeecg专用配置
+#jeecg:
+#  ffmpeg:
+#    bin: D:\java\ffmpeg\bin\ffmpeg.exe
+#  path:
+#    #文件上传根目录 设置
+#    #文件上传根目录 设置
+#    upload: /data/upload
+#    #webapp文件路径
+#    webapp: /data/webapp
+#    video-upload: /data/upload/video/
+#    image-upload: /data/upload/image/
+#    chrome-driver: D://chromedriver.exe
+#    csv-upload: /data/upload/csv/
+#    report-history: /data/report/history/
+#    report-daily: /data/report/daily/
+#kuaishou:
+#  group-control:
+#    path: http://127.0.0.1
+#    port: 4723
+#logging:
+#  level:
+#    root: info
+#  config: classpath:logback-test.xml
+#chrome:
+#  script:
+#    clean: sh /mnt/webapp/cleanProcess.sh
+#oss:
+#  replace:
+#    replace-value: oss-cn-beijing
+#    replace-old-value: oss-cn-beijing
+#    download: /mnt/file/video/
+
+