| | |
| | | </parent> |
| | | <groupId>com.gk.zhongtai</groupId> |
| | | <artifactId>hazardInvestgation</artifactId> |
| | | <version>2.0.5</version> |
| | | <version>3.7.24</version> |
| | | <packaging>jar</packaging> |
| | | |
| | | <properties> |
| | |
| | | <artifactId>documents4j-transformer-msoffice-word</artifactId> |
| | | <version>1.1.5</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.rocketmq</groupId> |
| | | <artifactId>rocketmq-client</artifactId> |
| | | <version>4.9.3</version> |
| | | <exclusions> |
| | | <exclusion> |
| | | <artifactId>logback-classic</artifactId> |
| | | <groupId>ch.qos.logback</groupId> |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <!-- https://mvnrepository.com/artifact/org.redisson/redisson-spring-boot-starter --> |
| | | <dependency> |
| | | <groupId>org.redisson</groupId> |
对比新文件 |
| | |
| | | package com.gk.hotwork.Config.attachment; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @email 1603559716@qq.com |
| | | * @author: zf |
| | | * @date: 2023/7/24 |
| | | * @time: 10:06 |
| | | */ |
| | | @Component |
| | | @Data |
| | | @ConfigurationProperties(prefix = "file.path") |
| | | public class FilePathConfig { |
| | | /** |
| | | * 文件保存根路径 |
| | | */ |
| | | private String dcPath; |
| | | /** |
| | | * 访问跟路径 |
| | | */ |
| | | private String urlRootPath; |
| | | /** |
| | | * 模块路径 |
| | | */ |
| | | private Map<String,String> module; |
| | | } |
对比新文件 |
| | |
| | | |
| | | package com.gk.hotwork.Config.attachment; |
| | | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.InitializingBean; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.lang.reflect.Field; |
| | | |
| | | /** |
| | | * @author : |
| | | * @description:项目启动就执行的工具类 |
| | | * @modified By: |
| | | * @version: 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class InitConfig implements InitializingBean { |
| | | |
| | | @Resource |
| | | FilePathConfig filePathConfig; |
| | | |
| | | @Override |
| | | public void afterPropertiesSet() throws Exception { |
| | | log.info("文件配置路径开始加载"); |
| | | reflect(filePathConfig); |
| | | log.info("设置模块文件路径缓存"); |
| | | } |
| | | |
| | | public static void reflect(Object o) throws IllegalAccessException { |
| | | Class cls = o.getClass(); |
| | | Field[] fields = cls.getDeclaredFields(); |
| | | for (int i = 0; i < fields.length; i++) { |
| | | Field f = fields[i]; |
| | | f.setAccessible(true); |
| | | log.info(f.getName() + "----:" + f.get(o)); |
| | | } |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.gk.hotwork.Domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import org.springframework.data.annotation.Id; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @email 1603559716@qq.com |
| | | * @author: zf |
| | | * @date: 2023/5/6 |
| | | * @time: 14:54 |
| | | */ |
| | | @Data |
| | | @TableName("attachment") |
| | | public class AttachmentInfo { |
| | | @Id |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | //文件标识 |
| | | private String fileKey; |
| | | //文件本地址 |
| | | private String filePath; |
| | | //文件访问路径 |
| | | private String fileUrl; |
| | | //文件名称 |
| | | private String fileName; |
| | | //文件后缀 |
| | | private String fileSuffix; |
| | | //文件描述 |
| | | private String fileDesc; |
| | | //文件大小 |
| | | private Long fileSize; |
| | | //文件类型 |
| | | private String fileType; |
| | | //模块 |
| | | private String module; |
| | | //删除标识 0-未删除,1-删除 |
| | | private Integer delFlag; |
| | | //创建时间 |
| | | private Date createTime; |
| | | //创建人id |
| | | private Long createUid; |
| | | //创建人姓名 |
| | | private String createUname; |
| | | //修改时间 |
| | | private Date updateTime; |
| | | //修改人id |
| | | private Long updateUid; |
| | | //修改人姓名 |
| | | private String updateUname; |
| | | //业务id |
| | | private Long businessId; |
| | | |
| | | } |
| | |
| | | CLIENT_PARAM_ILLEGAL("A0430","参数非法"), |
| | | CLIENT_ORDER_OVERTIME("A0444","订单已超时"), |
| | | CLIENT_ORDER_CLOSE("A0443","订单已关闭"), |
| | | CLIENT_ERROR_DATA_NOT_EXISIST("A0445","数据不存在"), |
| | | |
| | | // 项目 |
| | | CLIENT_PROJECT_NOT_EXIST("A0450","项目不存在"), |
| | |
| | | RPC_ACCESS_EXCEPTION("R0004","RPC访问异常"), |
| | | |
| | | // 请求 |
| | | CLIENT_METHOD_NOT_MATCH("M0001","请求方法不匹配") |
| | | CLIENT_METHOD_NOT_MATCH("M0001","请求方法不匹配"), |
| | | //文件 |
| | | FILE_NOT_EXISIST("A0601","文件不存在"), |
| | | PATH_NOT_EXISIST("A0602","文件路径不存在"), |
| | | MODULE_NOT_EXISIST("A0603","模块不存在"), |
| | | FILE_UPLOAD_FAIL("A0604","文件上传失败"), |
| | | FILE_DOWNLOAD_FAIL("A0605","文件下载失败"), |
| | | FILE_DOWNLOAD_EXPERTION("A0606","文件下载异常"), |
| | | ; |
| | | |
| | | |
| | |
| | | |
| | | ResultVO<List<DepInfoRPCRespDTO>> listDepByDepIds(List<Long> depIds); |
| | | |
| | | |
| | | } |
| | |
| | | return new ResultVO<>(ResultCodes.OK,result); |
| | | } |
| | | |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.gk.hotwork.common; |
| | | |
| | | |
| | | /** |
| | | * @email 1603559716@qq.com |
| | | * @author: zf |
| | | * @date: 2023/5/7 |
| | | * @time: 13:42 |
| | | */ |
| | | public interface FileProjectConstants { |
| | | interface ReturnType { |
| | | int DETAIL = 1; |
| | | int KEY = 2; |
| | | int URL = 3; |
| | | } |
| | | enum FileError{ |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | tomcat: |
| | | uri-encoding: UTF-8 |
| | | basedir: / |
| | | port: 8006 |
| | | port: 8016 |
| | | servlet: |
| | | context-path: / |
| | | # mysql |
| | |
| | | |
| | | #redis |
| | | redis: |
| | | database: 0 |
| | | database: 14 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: root |
| | |
| | | max-active: 8 |
| | | max-wait: -1ms |
| | | min-idle: 0 |
| | | |
| | | |
| | | #控制线程是否执行 true:执行;false:不执行 |
| | | scheduling: |
| | |
| | | name: ali |
| | | key: |
| | | url: |
| | | |
| | |
| | | tomcat: |
| | | uri-encoding: UTF-8 |
| | | basedir: / |
| | | port: 8006 |
| | | port: 8016 |
| | | servlet: |
| | | context-path: / |
| | | # mysql |
| | | spring: |
| | | datasource: |
| | | one: |
| | | url: jdbc:mysql://twt.sinanoaq.com:13306/hotwork?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: Sinanoaq#415 |
| | | url: jdbc:mysql://124.221.143.185:23306/hazad?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: hazad |
| | | password: c26207f1e6 |
| | | type: com.alibaba.druid.pool.DruidDataSource |
| | | |
| | | #redis |
| | |
| | | database: 0 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: root |
| | | password: akj78avauba789a |
| | | jedis: |
| | | pool: |
| | | max-idle: 8 |
| | |
| | | application: |
| | | # 环境 dev|prod|online |
| | | profiles: |
| | | active: dev |
| | | active: prod |
| | | # active: prod |
| | | # active: test |
| | | # active: online |
| | | # active: test-local |
| | | |
| | | #redis |
| | | redis: |
| | | database: 0 |
| | | host: 10.187.1.202 |
| | | port: 6379 |
| | | password: ZhongtaiRedis@103 |
| | | redisson: |
| | | pool: |
| | | max-active: 12 |
| | | min-idle: 6 |
| | | |
| | | jedis: |
| | | pool: |
| | | max-idle: 8 |
| | | max-active: 8 |
| | | max-wait: -1ms |
| | | min-idle: 1 |
| | | # redis: |
| | | # database: 0 |
| | | # host: 10.187.1.202 |
| | | # port: 6379 |
| | | # password: ZhongtaiRedis@103 |
| | | # redisson: |
| | | # pool: |
| | | # max-active: 12 |
| | | # min-idle: 6 |
| | | # jedis: |
| | | # pool: |
| | | # max-idle: 8 |
| | | # max-active: 8 |
| | | # max-wait: -1ms |
| | | # min-idle: 1 |
| | | #security |
| | | security: |
| | | user: |