122 changed files with 2079 additions and 2091 deletions
@ -1,4 +0,0 @@ |
|||||
spring: |
|
||||
profiles: |
|
||||
active: dev |
|
||||
include: common, util-dev |
|
@ -1,196 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 --> |
|
||||
<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true --> |
|
||||
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 --> |
|
||||
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 --> |
|
||||
<configuration scan="true" scanPeriod="10 seconds"> |
|
||||
|
|
||||
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />--> |
|
||||
|
|
||||
<contextName>logback</contextName> |
|
||||
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 --> |
|
||||
<property name="log.path" value="/home/diplomatist/service/log/" /> |
|
||||
|
|
||||
<!-- 彩色日志 --> |
|
||||
<!-- 彩色日志依赖的渲染类 --> |
|
||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> |
|
||||
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> |
|
||||
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> |
|
||||
<!-- 彩色日志格式 --> |
|
||||
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> |
|
||||
|
|
||||
|
|
||||
<!--输出到控制台--> |
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
|
||||
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息--> |
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
|
||||
<level>info</level> |
|
||||
</filter> |
|
||||
<encoder> |
|
||||
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern> |
|
||||
<!-- 设置字符集 --> |
|
||||
<charset>UTF-8</charset> |
|
||||
</encoder> |
|
||||
</appender> |
|
||||
|
|
||||
|
|
||||
<!--输出到文件--> |
|
||||
|
|
||||
<!-- 时间滚动输出 level为 DEBUG 日志 --> |
|
||||
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
||||
<!-- 正在记录的日志文件的路径及文件名 --> |
|
||||
<file>${log.path}/log_debug.log</file> |
|
||||
<!--日志文件输出格式--> |
|
||||
<encoder> |
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|
||||
<charset>UTF-8</charset> <!-- 设置字符集 --> |
|
||||
</encoder> |
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|
||||
<!-- 日志归档 --> |
|
||||
<fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|
||||
<maxFileSize>100MB</maxFileSize> |
|
||||
</timeBasedFileNamingAndTriggeringPolicy> |
|
||||
<!--日志文件保留天数--> |
|
||||
<maxHistory>15</maxHistory> |
|
||||
</rollingPolicy> |
|
||||
<!-- 此日志文件只记录debug级别的 --> |
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|
||||
<level>debug</level> |
|
||||
<onMatch>ACCEPT</onMatch> |
|
||||
<onMismatch>DENY</onMismatch> |
|
||||
</filter> |
|
||||
</appender> |
|
||||
|
|
||||
<!-- 时间滚动输出 level为 INFO 日志 --> |
|
||||
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
||||
<!-- 正在记录的日志文件的路径及文件名 --> |
|
||||
<file>${log.path}/log_info.log</file> |
|
||||
<!--日志文件输出格式--> |
|
||||
<encoder> |
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|
||||
<charset>UTF-8</charset> |
|
||||
</encoder> |
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|
||||
<!-- 每天日志归档路径以及格式 --> |
|
||||
<fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|
||||
<maxFileSize>100MB</maxFileSize> |
|
||||
</timeBasedFileNamingAndTriggeringPolicy> |
|
||||
<!--日志文件保留天数--> |
|
||||
<maxHistory>15</maxHistory> |
|
||||
</rollingPolicy> |
|
||||
<!-- 此日志文件只记录info级别的 --> |
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|
||||
<level>info</level> |
|
||||
<onMatch>ACCEPT</onMatch> |
|
||||
<onMismatch>DENY</onMismatch> |
|
||||
</filter> |
|
||||
</appender> |
|
||||
|
|
||||
<!-- 时间滚动输出 level为 WARN 日志 --> |
|
||||
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
||||
<!-- 正在记录的日志文件的路径及文件名 --> |
|
||||
<file>${log.path}/log_warn.log</file> |
|
||||
<!--日志文件输出格式--> |
|
||||
<encoder> |
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
|
||||
</encoder> |
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|
||||
<fileNamePattern>${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|
||||
<maxFileSize>100MB</maxFileSize> |
|
||||
</timeBasedFileNamingAndTriggeringPolicy> |
|
||||
<!--日志文件保留天数--> |
|
||||
<maxHistory>15</maxHistory> |
|
||||
</rollingPolicy> |
|
||||
<!-- 此日志文件只记录warn级别的 --> |
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|
||||
<level>warn</level> |
|
||||
<onMatch>ACCEPT</onMatch> |
|
||||
<onMismatch>DENY</onMismatch> |
|
||||
</filter> |
|
||||
</appender> |
|
||||
|
|
||||
|
|
||||
<!-- 时间滚动输出 level为 ERROR 日志 --> |
|
||||
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
|
||||
<!-- 正在记录的日志文件的路径及文件名 --> |
|
||||
<file>${log.path}/log_error.log</file> |
|
||||
<!--日志文件输出格式--> |
|
||||
<encoder> |
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
|
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
|
||||
</encoder> |
|
||||
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
|
||||
<fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
|
||||
<maxFileSize>100MB</maxFileSize> |
|
||||
</timeBasedFileNamingAndTriggeringPolicy> |
|
||||
<!--日志文件保留天数--> |
|
||||
<maxHistory>15</maxHistory> |
|
||||
</rollingPolicy> |
|
||||
<!-- 此日志文件只记录ERROR级别的 --> |
|
||||
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
|
||||
<level>ERROR</level> |
|
||||
<onMatch>ACCEPT</onMatch> |
|
||||
<onMismatch>DENY</onMismatch> |
|
||||
</filter> |
|
||||
</appender> |
|
||||
|
|
||||
<!-- |
|
||||
<logger>用来设置某一个包或者具体的某一个类的日志打印级别、 |
|
||||
以及指定<appender>。<logger>仅有一个name属性, |
|
||||
一个可选的level和一个可选的addtivity属性。 |
|
||||
name:用来指定受此logger约束的某一个包或者具体的某一个类。 |
|
||||
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF, |
|
||||
还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。 |
|
||||
如果未设置此属性,那么当前logger将会继承上级的级别。 |
|
||||
addtivity:是否向上级logger传递打印信息。默认是true。 |
|
||||
--> |
|
||||
<!--<logger name="org.springframework.web" level="info"/>--> |
|
||||
<!--<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>--> |
|
||||
<!-- |
|
||||
使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作: |
|
||||
第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息 |
|
||||
第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别: |
|
||||
--> |
|
||||
|
|
||||
|
|
||||
<!-- |
|
||||
root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性 |
|
||||
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF, |
|
||||
不能设置为INHERITED或者同义词NULL。默认是DEBUG |
|
||||
可以包含零个或多个元素,标识这个appender将会添加到这个logger。 |
|
||||
--> |
|
||||
|
|
||||
<!--开发环境:打印控制台--> |
|
||||
<springProfile name="dev"> |
|
||||
<logger name="com.ccsens.ptpro.persist.*" level="debug"/> |
|
||||
</springProfile> |
|
||||
|
|
||||
<root level="info"> |
|
||||
<appender-ref ref="CONSOLE" /> |
|
||||
<appender-ref ref="DEBUG_FILE" /> |
|
||||
<appender-ref ref="INFO_FILE" /> |
|
||||
<appender-ref ref="WARN_FILE" /> |
|
||||
<appender-ref ref="ERROR_FILE" /> |
|
||||
</root> |
|
||||
|
|
||||
<!--生产环境:输出到文件--> |
|
||||
<!--<springProfile name="pro">--> |
|
||||
<!--<root level="info">--> |
|
||||
<!--<appender-ref ref="CONSOLE" />--> |
|
||||
<!--<appender-ref ref="DEBUG_FILE" />--> |
|
||||
<!--<appender-ref ref="INFO_FILE" />--> |
|
||||
<!--<appender-ref ref="ERROR_FILE" />--> |
|
||||
<!--<appender-ref ref="WARN_FILE" />--> |
|
||||
<!--</root>--> |
|
||||
<!--</springProfile>--> |
|
||||
|
|
||||
</configuration> |
|
@ -1,84 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
||||
<modelVersion>4.0.0</modelVersion> |
|
||||
<parent> |
|
||||
<artifactId>ccsens_dh</artifactId> |
|
||||
<groupId>com.ccsens</groupId> |
|
||||
<version>1.0-SNAPSHOT</version> |
|
||||
</parent> |
|
||||
|
|
||||
<artifactId>dh_ht</artifactId> |
|
||||
|
|
||||
<version>0.0.1-SNAPSHOT</version> |
|
||||
|
|
||||
<name>dh_ht</name> |
|
||||
|
|
||||
<description>Demo project for Spring Boot</description> |
|
||||
<properties> |
|
||||
<java.version>1.8</java.version> |
|
||||
</properties> |
|
||||
|
|
||||
<dependencies> |
|
||||
<!--cloud 工具类--> |
|
||||
<dependency> |
|
||||
<artifactId>cloudutil</artifactId> |
|
||||
<groupId>com.ccsens</groupId> |
|
||||
<version>1.0-SNAPSHOT</version> |
|
||||
</dependency> |
|
||||
|
|
||||
<dependency> |
|
||||
<groupId>com.ccsens</groupId> |
|
||||
<artifactId>util</artifactId> |
|
||||
<version>1.0-SNAPSHOT</version> |
|
||||
<scope>compile</scope> |
|
||||
</dependency> |
|
||||
<!--微信工具包--> |
|
||||
<dependency> |
|
||||
<artifactId>wechatutil</artifactId> |
|
||||
<groupId>com.ccsens</groupId> |
|
||||
<version>1.0-SNAPSHOT</version> |
|
||||
</dependency> |
|
||||
|
|
||||
|
|
||||
</dependencies> |
|
||||
|
|
||||
<build> |
|
||||
<plugins> |
|
||||
<plugin> |
|
||||
<groupId>org.mybatis.generator</groupId> |
|
||||
<artifactId>mybatis-generator-maven-plugin</artifactId> |
|
||||
<version>1.3.7</version> |
|
||||
<configuration> |
|
||||
<configurationFile>${basedir}/src/main/resources/mbg.xml</configurationFile> |
|
||||
<overwrite>true</overwrite> |
|
||||
</configuration> |
|
||||
<dependencies> |
|
||||
<dependency> |
|
||||
<groupId>mysql</groupId> |
|
||||
<artifactId>mysql-connector-java</artifactId> |
|
||||
<version>5.1.34</version> |
|
||||
</dependency> |
|
||||
</dependencies> |
|
||||
</plugin> |
|
||||
<plugin> |
|
||||
<groupId>org.springframework.boot</groupId> |
|
||||
<artifactId>spring-boot-maven-plugin</artifactId> |
|
||||
<configuration> |
|
||||
<mainClass>com.ccsens.dh_ht.DhHtApplication</mainClass> |
|
||||
<!--<skip>true</skip>--> |
|
||||
</configuration> |
|
||||
<executions> |
|
||||
<execution> |
|
||||
<goals> |
|
||||
<goal>repackage</goal> |
|
||||
</goals> |
|
||||
</execution> |
|
||||
</executions> |
|
||||
</plugin> |
|
||||
|
|
||||
</plugins> |
|
||||
</build> |
|
||||
|
|
||||
|
|
||||
</project> |
|
@ -1,22 +0,0 @@ |
|||||
package com.ccsens.dh_ht.config; |
|
||||
|
|
||||
import com.ccsens.dh_ht.intercept.MybatisInterceptor; |
|
||||
import org.springframework.context.annotation.Bean; |
|
||||
import org.springframework.context.annotation.Configuration; |
|
||||
|
|
||||
/** |
|
||||
* @description: |
|
||||
* @author: wuHuiJuan |
|
||||
* @create: 2019/12/03 18:01 |
|
||||
*/ |
|
||||
@Configuration |
|
||||
public class BeanConfig { |
|
||||
/** |
|
||||
* 注册拦截器 |
|
||||
*/ |
|
||||
@Bean |
|
||||
public MybatisInterceptor mybatisInterceptor() { |
|
||||
MybatisInterceptor interceptor = new MybatisInterceptor(); |
|
||||
return interceptor; |
|
||||
} |
|
||||
} |
|
@ -1,128 +0,0 @@ |
|||||
package com.ccsens.dh_ht.config; |
|
||||
|
|
||||
|
|
||||
import cn.hutool.core.lang.Snowflake; |
|
||||
import cn.hutool.core.util.IdUtil; |
|
||||
import com.ccsens.util.config.DruidProps; |
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature; |
|
||||
import com.fasterxml.jackson.databind.ObjectMapper; |
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule; |
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
|
||||
import org.springframework.beans.factory.annotation.Value; |
|
||||
import org.springframework.context.annotation.Bean; |
|
||||
import org.springframework.context.annotation.Configuration; |
|
||||
import org.springframework.http.MediaType; |
|
||||
import org.springframework.http.converter.HttpMessageConverter; |
|
||||
import org.springframework.http.converter.StringHttpMessageConverter; |
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; |
|
||||
import org.springframework.web.servlet.config.annotation.*; |
|
||||
|
|
||||
import javax.annotation.Resource; |
|
||||
import javax.sql.DataSource; |
|
||||
import java.nio.charset.Charset; |
|
||||
import java.util.ArrayList; |
|
||||
import java.util.List; |
|
||||
import java.util.TimeZone; |
|
||||
|
|
||||
@Configuration |
|
||||
public class SpringConfig implements WebMvcConfigurer { |
|
||||
@Resource |
|
||||
private DruidProps druidPropsUtil; |
|
||||
@Value("${spring.snowflake.workerId}") |
|
||||
private String workerId; |
|
||||
@Value("${spring.snowflake.datacenterId}") |
|
||||
private String datacenterId; |
|
||||
|
|
||||
/** |
|
||||
* 配置Converter |
|
||||
* @return |
|
||||
*/ |
|
||||
@Bean |
|
||||
public HttpMessageConverter<String> responseStringConverter() { |
|
||||
StringHttpMessageConverter converter = new StringHttpMessageConverter( |
|
||||
Charset.forName("UTF-8")); |
|
||||
return converter; |
|
||||
} |
|
||||
|
|
||||
@Bean |
|
||||
public HttpMessageConverter<Object> responseJsonConverter(){ |
|
||||
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); |
|
||||
List<MediaType> mediaTypeList = new ArrayList<>(); |
|
||||
mediaTypeList.add(MediaType.TEXT_HTML); |
|
||||
mediaTypeList.add(MediaType.APPLICATION_JSON_UTF8); |
|
||||
converter.setSupportedMediaTypes(mediaTypeList); |
|
||||
|
|
||||
ObjectMapper objectMapper = new ObjectMapper(); |
|
||||
SimpleModule simpleModule = new SimpleModule(); |
|
||||
simpleModule.addSerializer(Long.class, ToStringSerializer.instance); |
|
||||
simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance); |
|
||||
objectMapper.registerModule(simpleModule); |
|
||||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); |
|
||||
objectMapper.setTimeZone(TimeZone.getTimeZone("GMT+8")); |
|
||||
converter.setObjectMapper(objectMapper); |
|
||||
|
|
||||
return converter; |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { |
|
||||
converters.add(responseStringConverter()); |
|
||||
converters.add(responseJsonConverter()); |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { |
|
||||
configurer.favorPathExtension(false); |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public void addCorsMappings(CorsRegistry registry) { |
|
||||
registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") |
|
||||
// .allowedMethods("*") // 允许提交请求的方法,*表示全部允许
|
|
||||
.allowedOrigins("*") // #允许向该服务器提交请求的URI,*表示全部允许
|
|
||||
.allowCredentials(true) // 允许cookies跨域
|
|
||||
.allowedHeaders("*") // #允许访问的头信息,*表示全部
|
|
||||
.maxAge(18000L); // 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
|
|
||||
|
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 配置静态资源 |
|
||||
*/ |
|
||||
@Override |
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) { |
|
||||
registry.addResourceHandler("swagger-ui.html") |
|
||||
.addResourceLocations("classpath:/META-INF/resources/"); |
|
||||
registry.addResourceHandler("/webjars/**") |
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/"); |
|
||||
|
|
||||
registry.addResourceHandler("/uploads/**") |
|
||||
.addResourceLocations("file:///home/ht/service/uploads/"); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 配置拦截器 |
|
||||
* @param registry |
|
||||
*/ |
|
||||
@Override |
|
||||
public void addInterceptors(InterceptorRegistry registry) { |
|
||||
|
|
||||
} |
|
||||
|
|
||||
|
|
||||
/** |
|
||||
* 配置数据源(单数据源) |
|
||||
*/ |
|
||||
@Bean |
|
||||
public DataSource dataSource(){ |
|
||||
return druidPropsUtil.createDruidDataSource(); |
|
||||
} |
|
||||
|
|
||||
@Bean |
|
||||
public Snowflake snowflake(){ |
|
||||
return IdUtil.createSnowflake(Long.valueOf(workerId), Long.valueOf(datacenterId)); |
|
||||
} |
|
||||
} |
|
@ -1,56 +0,0 @@ |
|||||
package com.ccsens.dh_ht.config; |
|
||||
|
|
||||
import com.ccsens.util.WebConstant; |
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; |
|
||||
import org.springframework.context.annotation.Bean; |
|
||||
import org.springframework.context.annotation.Configuration; |
|
||||
import springfox.documentation.builders.ParameterBuilder; |
|
||||
import springfox.documentation.builders.RequestHandlerSelectors; |
|
||||
import springfox.documentation.schema.ModelRef; |
|
||||
import springfox.documentation.service.ApiInfo; |
|
||||
import springfox.documentation.service.Parameter; |
|
||||
import springfox.documentation.spi.DocumentationType; |
|
||||
import springfox.documentation.spring.web.plugins.Docket; |
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2; |
|
||||
|
|
||||
import java.util.ArrayList; |
|
||||
import java.util.List; |
|
||||
|
|
||||
@Configuration |
|
||||
@EnableSwagger2 |
|
||||
@ConditionalOnExpression("${swagger.enable}") |
|
||||
//public class SwaggerConfigure extends WebMvcConfigurationSupport {
|
|
||||
public class SwaggerConfigure /*implements WebMvcConfigurer*/ { |
|
||||
@Bean |
|
||||
public Docket customDocket() { |
|
||||
//
|
|
||||
return new Docket(DocumentationType.SWAGGER_2) |
|
||||
.apiInfo(apiInfo()) |
|
||||
.select() |
|
||||
.apis(RequestHandlerSelectors |
|
||||
.basePackage("com.ccsens.dh_ht.api")) |
|
||||
.build() |
|
||||
.globalOperationParameters(setHeaderToken()); |
|
||||
} |
|
||||
|
|
||||
private ApiInfo apiInfo() { |
|
||||
return new ApiInfo("Swagger Tall-game",//大标题 title
|
|
||||
"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",//小标题
|
|
||||
"1.0.0",//版本
|
|
||||
"http://swagger.io/terms/",//termsOfServiceUrl
|
|
||||
"zhangsan",//作者
|
|
||||
"Apache 2.0",//链接显示文字
|
|
||||
"http://www.apache.org/licenses/LICENSE-2.0.html"//网站链接
|
|
||||
); |
|
||||
} |
|
||||
|
|
||||
private List<Parameter> setHeaderToken() { |
|
||||
ParameterBuilder tokenPar = new ParameterBuilder(); |
|
||||
List<Parameter> pars = new ArrayList<>(); |
|
||||
tokenPar.name(WebConstant.HEADER_KEY_TOKEN).description("token") |
|
||||
.defaultValue(WebConstant.HEADER_KEY_TOKEN_PREFIX) |
|
||||
.modelRef(new ModelRef("string")).parameterType("header").required(false).build(); |
|
||||
pars.add(tokenPar.build()); |
|
||||
return pars; |
|
||||
} |
|
||||
} |
|
@ -1,25 +0,0 @@ |
|||||
package com.ccsens.dh_ht.service; |
|
||||
|
|
||||
import com.ccsens.dh_ht.bean.dto.ProjectDto; |
|
||||
import com.ccsens.dh_ht.bean.vo.ProjectVo; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
import org.springframework.transaction.annotation.Propagation; |
|
||||
import org.springframework.transaction.annotation.Transactional; |
|
||||
|
|
||||
import java.util.List; |
|
||||
/** |
|
||||
* @author 逗 |
|
||||
*/ |
|
||||
@Slf4j |
|
||||
@Service |
|
||||
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) |
|
||||
public class ProjectService implements IProjectService { |
|
||||
|
|
||||
|
|
||||
@Override |
|
||||
public List<ProjectVo.DomainInfo> queryDomainByUser(ProjectDto.QueryProjectDto param, Long userId) { |
|
||||
|
|
||||
return null; |
|
||||
} |
|
||||
} |
|
@ -1,12 +0,0 @@ |
|||||
package com.ccsens.dh_ht.util; |
|
||||
|
|
||||
import com.ccsens.util.CodeError; |
|
||||
|
|
||||
/** |
|
||||
* @author 逗 |
|
||||
*/ |
|
||||
public class PtOsCodeError extends CodeError { |
|
||||
|
|
||||
public static final Code NOT_WBS_SHEET = new Code(501,"找不到wbs表",true); |
|
||||
|
|
||||
} |
|
@ -1,50 +0,0 @@ |
|||||
package com.ccsens.dh_ht.util; |
|
||||
|
|
||||
import java.util.HashMap; |
|
||||
import java.util.Map; |
|
||||
|
|
||||
/** |
|
||||
* @author 逗 |
|
||||
*/ |
|
||||
public class PtOsConstant { |
|
||||
|
|
||||
/**图片类型*/ |
|
||||
public static final String FILE_TYPE_IMG = "bmp,jpg,jpeg,png,tif,gif,pcx,tga,exif,fpx,svg,psd,cdr,pcd,dxf,ufo,eps,ai,raw,WMF,webp"; |
|
||||
/**文档类型*/ |
|
||||
public static final String FILE_TYPE_DOCUMENT = "doc, dot, wps, wpt, docx, dotx, docm, dotm, xls, xlt, et, xlsx, xltx, csv, xlsm, xltm, ppt,pptx,pptm,ppsx,ppsm,pps,potx,potm,dpt,dps, pdf"; |
|
||||
|
|
||||
|
|
||||
/**验证手机正则*/ |
|
||||
public static final String PHONE_REGEX = "^[1]([3-9])[0-9]{9}$"; |
|
||||
/**字符串分隔符*/ |
|
||||
public static final String STRING_REGEX = ",|,|;|;|、|/"; |
|
||||
/**wbs相关*/ |
|
||||
public static final class WbsExcel { |
|
||||
/**wbsSheet*/ |
|
||||
public static final String WBS_SHEET = "WBS"; |
|
||||
/**项目成员Sheet*/ |
|
||||
public static final String MEMBER_SHEET = "项目成员表"; |
|
||||
/**项目信息头*/ |
|
||||
public static final String PROJECT_INFO_TITLE = "项目信息"; |
|
||||
/**任务信息头*/ |
|
||||
public static final String TASK_INFO_TITLE = "项目任务分解"; |
|
||||
/**excel文件格式验证*/ |
|
||||
public static final String WBS_FILE_FORMAT = "xls,xlsx"; |
|
||||
/**插件配置表*/ |
|
||||
public static final String WBS_PLUGIN_CONFIG = "插件配置表"; |
|
||||
} |
|
||||
|
|
||||
/**wbs表时长对应关系表*/ |
|
||||
public static final Map<String, Long> WBS_DURATION = new HashMap<>(); |
|
||||
static { |
|
||||
WBS_DURATION.put("s",1000L); |
|
||||
WBS_DURATION.put("min",60 * 1000L); |
|
||||
WBS_DURATION.put("h",60 * 60 * 1000L); |
|
||||
WBS_DURATION.put("d",24 * 60 * 60 * 1000L); |
|
||||
WBS_DURATION.put("w",7 * 24 * 60 * 60 * 1000L); |
|
||||
WBS_DURATION.put("m",30 * 24 * 60 * 60 * 1000L); |
|
||||
WBS_DURATION.put("y",365 * 24 * 60 * 60 * 1000L); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,50 +0,0 @@ |
|||||
server: |
|
||||
port: 7310 |
|
||||
servlet: |
|
||||
context-path: |
|
||||
spring: |
|
||||
application: |
|
||||
name: dh_ht |
|
||||
datasource: |
|
||||
type: com.alibaba.druid.pool.DruidDataSource |
|
||||
# rabbitmq: |
|
||||
# host: 192.168.0.99 |
|
||||
# password: 111111 |
|
||||
# port: 5672 |
|
||||
# username: admin |
|
||||
rabbitmq: |
|
||||
host: 127.0.0.1 |
|
||||
password: guest |
|
||||
port: 5672 |
|
||||
username: guest |
|
||||
redis: |
|
||||
database: 0 |
|
||||
host: 127.0.0.1 |
|
||||
jedis: |
|
||||
pool: |
|
||||
max-active: 200 |
|
||||
max-idle: 10 |
|
||||
max-wait: -1ms |
|
||||
min-idle: 0 |
|
||||
password: '' |
|
||||
port: 6379 |
|
||||
timeout: 1000ms |
|
||||
swagger: |
|
||||
enable: true |
|
||||
mybatisCache: |
|
||||
database: 1 |
|
||||
host: 127.0.0.1 |
|
||||
jedis: |
|
||||
pool: |
|
||||
max-active: 200 |
|
||||
max-idle: 10 |
|
||||
max-wait: -1 |
|
||||
min-idle: 0 |
|
||||
password: '' |
|
||||
port: 6379 |
|
||||
timeout: 1000 |
|
||||
|
|
||||
file: |
|
||||
path: /home/ht/service/uploads/ |
|
||||
domain: https://test.tall.wiki/gateway/dh_ht |
|
||||
imgDomain: https://test.tall.wiki/gateway/dh_ht/uploads/ |
|
@ -1,40 +0,0 @@ |
|||||
server: |
|
||||
port: 7310 |
|
||||
servlet: |
|
||||
context-path: |
|
||||
spring: |
|
||||
application: |
|
||||
name: dh_ht |
|
||||
datasource: |
|
||||
type: com.alibaba.druid.pool.DruidDataSource |
|
||||
rabbitmq: |
|
||||
host: 121.36.3.207 |
|
||||
password: 111111 |
|
||||
port: 5672 |
|
||||
username: admin |
|
||||
redis: |
|
||||
database: 0 |
|
||||
host: 127.0.0.1 |
|
||||
jedis: |
|
||||
pool: |
|
||||
max-active: 200 |
|
||||
max-idle: 10 |
|
||||
max-wait: -1ms |
|
||||
min-idle: 0 |
|
||||
password: '' |
|
||||
# password: 'areowqr!@43ef' |
|
||||
port: 6379 |
|
||||
timeout: 1000ms |
|
||||
swagger: |
|
||||
enable: true |
|
||||
eureka: |
|
||||
instance: |
|
||||
ip-address: 121.36.106.168 |
|
||||
|
|
||||
gatewayUrl: https://www.tall.wiki/gateway/ |
|
||||
notGatewayUrl: https://www.tall.wiki/ |
|
||||
apiUrl: https://www.tall.wiki/ |
|
||||
file: |
|
||||
path: /home/ht/service/uploads/ |
|
||||
domain: https://www.tall.wiki/gateway/dh_ht |
|
||||
imgDomain: https://www.tall.wiki/gateway/dh_ht/uploads/ |
|
@ -1,48 +0,0 @@ |
|||||
server: |
|
||||
port: 7310 |
|
||||
servlet: |
|
||||
context-path: |
|
||||
spring: |
|
||||
application: |
|
||||
name: dh_ht |
|
||||
datasource: |
|
||||
type: com.alibaba.druid.pool.DruidDataSource |
|
||||
rabbitmq: |
|
||||
host: dd.tall.wiki |
|
||||
password: 111111 |
|
||||
port: 5672 |
|
||||
username: admin |
|
||||
redis: |
|
||||
database: 0 |
|
||||
host: 127.0.0.1 |
|
||||
jedis: |
|
||||
pool: |
|
||||
max-active: 200 |
|
||||
max-idle: 10 |
|
||||
max-wait: -1ms |
|
||||
min-idle: 0 |
|
||||
password: '' |
|
||||
port: 6379 |
|
||||
timeout: 1000ms |
|
||||
swagger: |
|
||||
enable: true |
|
||||
mybatisCache: |
|
||||
database: 1 |
|
||||
host: 127.0.0.1 |
|
||||
jedis: |
|
||||
pool: |
|
||||
max-active: 200 |
|
||||
max-idle: 10 |
|
||||
max-wait: -1 |
|
||||
min-idle: 0 |
|
||||
password: '' |
|
||||
port: 6379 |
|
||||
timeout: 1000 |
|
||||
eureka: |
|
||||
instance: |
|
||||
ip-address: 127.0.0.1 |
|
||||
|
|
||||
file: |
|
||||
path: /home/ht/service/uploads/ |
|
||||
domain: https://test.tall.wiki/gateway/dh_ht |
|
||||
imgDomain: https://test.tall.wiki/gateway/dh_ht/uploads/ |
|
@ -1,4 +0,0 @@ |
|||||
spring: |
|
||||
profiles: |
|
||||
active: dev |
|
||||
include: common, util-dev |
|
@ -1,33 +0,0 @@ |
|||||
HELP.md |
|
||||
target/ |
|
||||
!.mvn/wrapper/maven-wrapper.jar |
|
||||
!**/src/main/**/target/ |
|
||||
!**/src/test/**/target/ |
|
||||
|
|
||||
### STS ### |
|
||||
.apt_generated |
|
||||
.classpath |
|
||||
.factorypath |
|
||||
.project |
|
||||
.settings |
|
||||
.springBeans |
|
||||
.sts4-cache |
|
||||
|
|
||||
### IntelliJ IDEA ### |
|
||||
.idea |
|
||||
*.iws |
|
||||
*.iml |
|
||||
*.ipr |
|
||||
|
|
||||
### NetBeans ### |
|
||||
/nbproject/private/ |
|
||||
/nbbuild/ |
|
||||
/dist/ |
|
||||
/nbdist/ |
|
||||
/.nb-gradle/ |
|
||||
build/ |
|
||||
!**/src/main/**/build/ |
|
||||
!**/src/test/**/build/ |
|
||||
|
|
||||
### VS Code ### |
|
||||
.vscode/ |
|
@ -1,322 +0,0 @@ |
|||||
#!/bin/sh |
|
||||
# ---------------------------------------------------------------------------- |
|
||||
# Licensed to the Apache Software Foundation (ASF) under one |
|
||||
# or more contributor license agreements. See the NOTICE file |
|
||||
# distributed with this work for additional information |
|
||||
# regarding copyright ownership. The ASF licenses this file |
|
||||
# to you under the Apache License, Version 2.0 (the |
|
||||
# "License"); you may not use this file except in compliance |
|
||||
# with the License. You may obtain a copy of the License at |
|
||||
# |
|
||||
# https://www.apache.org/licenses/LICENSE-2.0 |
|
||||
# |
|
||||
# Unless required by applicable law or agreed to in writing, |
|
||||
# software distributed under the License is distributed on an |
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|
||||
# KIND, either express or implied. See the License for the |
|
||||
# specific language governing permissions and limitations |
|
||||
# under the License. |
|
||||
# ---------------------------------------------------------------------------- |
|
||||
|
|
||||
# ---------------------------------------------------------------------------- |
|
||||
# Maven Start Up Batch script |
|
||||
# |
|
||||
# Required ENV vars: |
|
||||
# ------------------ |
|
||||
# JAVA_HOME - location of a JDK home dir |
|
||||
# |
|
||||
# Optional ENV vars |
|
||||
# ----------------- |
|
||||
# M2_HOME - location of maven2's installed home dir |
|
||||
# MAVEN_OPTS - parameters passed to the Java VM when running Maven |
|
||||
# e.g. to debug Maven itself, use |
|
||||
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
|
||||
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files |
|
||||
# ---------------------------------------------------------------------------- |
|
||||
|
|
||||
if [ -z "$MAVEN_SKIP_RC" ]; then |
|
||||
|
|
||||
if [ -f /etc/mavenrc ]; then |
|
||||
. /etc/mavenrc |
|
||||
fi |
|
||||
|
|
||||
if [ -f "$HOME/.mavenrc" ]; then |
|
||||
. "$HOME/.mavenrc" |
|
||||
fi |
|
||||
|
|
||||
fi |
|
||||
|
|
||||
# OS specific support. $var _must_ be set to either true or false. |
|
||||
cygwin=false |
|
||||
darwin=false |
|
||||
mingw=false |
|
||||
case "$(uname)" in |
|
||||
CYGWIN*) cygwin=true ;; |
|
||||
MINGW*) mingw=true ;; |
|
||||
Darwin*) |
|
||||
darwin=true |
|
||||
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home |
|
||||
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html |
|
||||
if [ -z "$JAVA_HOME" ]; then |
|
||||
if [ -x "/usr/libexec/java_home" ]; then |
|
||||
export JAVA_HOME="$(/usr/libexec/java_home)" |
|
||||
else |
|
||||
export JAVA_HOME="/Library/Java/Home" |
|
||||
fi |
|
||||
fi |
|
||||
;; |
|
||||
esac |
|
||||
|
|
||||
if [ -z "$JAVA_HOME" ]; then |
|
||||
if [ -r /etc/gentoo-release ]; then |
|
||||
JAVA_HOME=$(java-config --jre-home) |
|
||||
fi |
|
||||
fi |
|
||||
|
|
||||
if [ -z "$M2_HOME" ]; then |
|
||||
## resolve links - $0 may be a link to maven's home |
|
||||
PRG="$0" |
|
||||
|
|
||||
# need this for relative symlinks |
|
||||
while [ -h "$PRG" ]; do |
|
||||
ls=$(ls -ld "$PRG") |
|
||||
link=$(expr "$ls" : '.*-> \(.*\)$') |
|
||||
if expr "$link" : '/.*' >/dev/null; then |
|
||||
PRG="$link" |
|
||||
else |
|
||||
PRG="$(dirname "$PRG")/$link" |
|
||||
fi |
|
||||
done |
|
||||
|
|
||||
saveddir=$(pwd) |
|
||||
|
|
||||
M2_HOME=$(dirname "$PRG")/.. |
|
||||
|
|
||||
# make it fully qualified |
|
||||
M2_HOME=$(cd "$M2_HOME" && pwd) |
|
||||
|
|
||||
cd "$saveddir" |
|
||||
# echo Using m2 at $M2_HOME |
|
||||
fi |
|
||||
|
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched |
|
||||
if $cygwin; then |
|
||||
[ -n "$M2_HOME" ] && |
|
||||
M2_HOME=$(cygpath --unix "$M2_HOME") |
|
||||
[ -n "$JAVA_HOME" ] && |
|
||||
JAVA_HOME=$(cygpath --unix "$JAVA_HOME") |
|
||||
[ -n "$CLASSPATH" ] && |
|
||||
CLASSPATH=$(cygpath --path --unix "$CLASSPATH") |
|
||||
fi |
|
||||
|
|
||||
# For Mingw, ensure paths are in UNIX format before anything is touched |
|
||||
if $mingw; then |
|
||||
[ -n "$M2_HOME" ] && |
|
||||
M2_HOME="$( ( |
|
||||
cd "$M2_HOME" |
|
||||
pwd |
|
||||
))" |
|
||||
[ -n "$JAVA_HOME" ] && |
|
||||
JAVA_HOME="$( ( |
|
||||
cd "$JAVA_HOME" |
|
||||
pwd |
|
||||
))" |
|
||||
fi |
|
||||
|
|
||||
if [ -z "$JAVA_HOME" ]; then |
|
||||
javaExecutable="$(which javac)" |
|
||||
if [ -n "$javaExecutable" ] && ! [ "$(expr \"$javaExecutable\" : '\([^ ]*\)')" = "no" ]; then |
|
||||
# readlink(1) is not available as standard on Solaris 10. |
|
||||
readLink=$(which readlink) |
|
||||
if [ ! $(expr "$readLink" : '\([^ ]*\)') = "no" ]; then |
|
||||
if $darwin; then |
|
||||
javaHome="$(dirname \"$javaExecutable\")" |
|
||||
javaExecutable="$(cd \"$javaHome\" && pwd -P)/javac" |
|
||||
else |
|
||||
javaExecutable="$(readlink -f \"$javaExecutable\")" |
|
||||
fi |
|
||||
javaHome="$(dirname \"$javaExecutable\")" |
|
||||
javaHome=$(expr "$javaHome" : '\(.*\)/bin') |
|
||||
JAVA_HOME="$javaHome" |
|
||||
export JAVA_HOME |
|
||||
fi |
|
||||
fi |
|
||||
fi |
|
||||
|
|
||||
if [ -z "$JAVACMD" ]; then |
|
||||
if [ -n "$JAVA_HOME" ]; then |
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ]; then |
|
||||
# IBM's JDK on AIX uses strange locations for the executables |
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java" |
|
||||
else |
|
||||
JAVACMD="$JAVA_HOME/bin/java" |
|
||||
fi |
|
||||
else |
|
||||
JAVACMD="$(which java)" |
|
||||
fi |
|
||||
fi |
|
||||
|
|
||||
if [ ! -x "$JAVACMD" ]; then |
|
||||
echo "Error: JAVA_HOME is not defined correctly." >&2 |
|
||||
echo " We cannot execute $JAVACMD" >&2 |
|
||||
exit 1 |
|
||||
fi |
|
||||
|
|
||||
if [ -z "$JAVA_HOME" ]; then |
|
||||
echo "Warning: JAVA_HOME environment variable is not set." |
|
||||
fi |
|
||||
|
|
||||
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher |
|
||||
|
|
||||
# traverses directory structure from process work directory to filesystem root |
|
||||
# first directory with .mvn subdirectory is considered project base directory |
|
||||
find_maven_basedir() { |
|
||||
|
|
||||
if [ -z "$1" ]; then |
|
||||
echo "Path not specified to find_maven_basedir" |
|
||||
return 1 |
|
||||
fi |
|
||||
|
|
||||
basedir="$1" |
|
||||
wdir="$1" |
|
||||
while [ "$wdir" != '/' ]; do |
|
||||
if [ -d "$wdir"/.mvn ]; then |
|
||||
basedir=$wdir |
|
||||
break |
|
||||
fi |
|
||||
# workaround for JBEAP-8937 (on Solaris 10/Sparc) |
|
||||
if [ -d "${wdir}" ]; then |
|
||||
wdir=$( |
|
||||
cd "$wdir/.." |
|
||||
pwd |
|
||||
) |
|
||||
fi |
|
||||
# end of workaround |
|
||||
done |
|
||||
echo "${basedir}" |
|
||||
} |
|
||||
|
|
||||
# concatenates all lines of a file |
|
||||
concat_lines() { |
|
||||
if [ -f "$1" ]; then |
|
||||
echo "$(tr -s '\n' ' ' <"$1")" |
|
||||
fi |
|
||||
} |
|
||||
|
|
||||
BASE_DIR=$(find_maven_basedir "$(pwd)") |
|
||||
if [ -z "$BASE_DIR" ]; then |
|
||||
exit 1 |
|
||||
fi |
|
||||
|
|
||||
########################################################################################## |
|
||||
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
|
||||
# This allows using the maven wrapper in projects that prohibit checking in binary data. |
|
||||
########################################################################################## |
|
||||
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then |
|
||||
if [ "$MVNW_VERBOSE" = true ]; then |
|
||||
echo "Found .mvn/wrapper/maven-wrapper.jar" |
|
||||
fi |
|
||||
else |
|
||||
if [ "$MVNW_VERBOSE" = true ]; then |
|
||||
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." |
|
||||
fi |
|
||||
if [ -n "$MVNW_REPOURL" ]; then |
|
||||
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|
||||
else |
|
||||
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|
||||
fi |
|
||||
while IFS="=" read key value; do |
|
||||
case "$key" in wrapperUrl) |
|
||||
jarUrl="$value" |
|
||||
break |
|
||||
;; |
|
||||
esac |
|
||||
done <"$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" |
|
||||
if [ "$MVNW_VERBOSE" = true ]; then |
|
||||
echo "Downloading from: $jarUrl" |
|
||||
fi |
|
||||
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" |
|
||||
if $cygwin; then |
|
||||
wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") |
|
||||
fi |
|
||||
|
|
||||
if command -v wget >/dev/null; then |
|
||||
if [ "$MVNW_VERBOSE" = true ]; then |
|
||||
echo "Found wget ... using wget" |
|
||||
fi |
|
||||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then |
|
||||
wget "$jarUrl" -O "$wrapperJarPath" |
|
||||
else |
|
||||
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" |
|
||||
fi |
|
||||
elif command -v curl >/dev/null; then |
|
||||
if [ "$MVNW_VERBOSE" = true ]; then |
|
||||
echo "Found curl ... using curl" |
|
||||
fi |
|
||||
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then |
|
||||
curl -o "$wrapperJarPath" "$jarUrl" -f |
|
||||
else |
|
||||
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f |
|
||||
fi |
|
||||
|
|
||||
else |
|
||||
if [ "$MVNW_VERBOSE" = true ]; then |
|
||||
echo "Falling back to using Java to download" |
|
||||
fi |
|
||||
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" |
|
||||
# For Cygwin, switch paths to Windows format before running javac |
|
||||
if $cygwin; then |
|
||||
javaClass=$(cygpath --path --windows "$javaClass") |
|
||||
fi |
|
||||
if [ -e "$javaClass" ]; then |
|
||||
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then |
|
||||
if [ "$MVNW_VERBOSE" = true ]; then |
|
||||
echo " - Compiling MavenWrapperDownloader.java ..." |
|
||||
fi |
|
||||
# Compiling the Java class |
|
||||
("$JAVA_HOME/bin/javac" "$javaClass") |
|
||||
fi |
|
||||
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then |
|
||||
# Running the downloader |
|
||||
if [ "$MVNW_VERBOSE" = true ]; then |
|
||||
echo " - Running MavenWrapperDownloader.java ..." |
|
||||
fi |
|
||||
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") |
|
||||
fi |
|
||||
fi |
|
||||
fi |
|
||||
fi |
|
||||
########################################################################################## |
|
||||
# End of extension |
|
||||
########################################################################################## |
|
||||
|
|
||||
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} |
|
||||
if [ "$MVNW_VERBOSE" = true ]; then |
|
||||
echo $MAVEN_PROJECTBASEDIR |
|
||||
fi |
|
||||
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" |
|
||||
|
|
||||
# For Cygwin, switch paths to Windows format before running java |
|
||||
if $cygwin; then |
|
||||
[ -n "$M2_HOME" ] && |
|
||||
M2_HOME=$(cygpath --path --windows "$M2_HOME") |
|
||||
[ -n "$JAVA_HOME" ] && |
|
||||
JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") |
|
||||
[ -n "$CLASSPATH" ] && |
|
||||
CLASSPATH=$(cygpath --path --windows "$CLASSPATH") |
|
||||
[ -n "$MAVEN_PROJECTBASEDIR" ] && |
|
||||
MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") |
|
||||
fi |
|
||||
|
|
||||
# Provide a "standardized" way to retrieve the CLI args that will |
|
||||
# work with both Windows and non-Windows executions. |
|
||||
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" |
|
||||
export MAVEN_CMD_LINE_ARGS |
|
||||
|
|
||||
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
|
||||
|
|
||||
exec "$JAVACMD" \ |
|
||||
$MAVEN_OPTS \ |
|
||||
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ |
|
||||
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ |
|
||||
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" |
|
@ -1,182 +0,0 @@ |
|||||
@REM ---------------------------------------------------------------------------- |
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one |
|
||||
@REM or more contributor license agreements. See the NOTICE file |
|
||||
@REM distributed with this work for additional information |
|
||||
@REM regarding copyright ownership. The ASF licenses this file |
|
||||
@REM to you under the Apache License, Version 2.0 (the |
|
||||
@REM "License"); you may not use this file except in compliance |
|
||||
@REM with the License. You may obtain a copy of the License at |
|
||||
@REM |
|
||||
@REM https://www.apache.org/licenses/LICENSE-2.0 |
|
||||
@REM |
|
||||
@REM Unless required by applicable law or agreed to in writing, |
|
||||
@REM software distributed under the License is distributed on an |
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|
||||
@REM KIND, either express or implied. See the License for the |
|
||||
@REM specific language governing permissions and limitations |
|
||||
@REM under the License. |
|
||||
@REM ---------------------------------------------------------------------------- |
|
||||
|
|
||||
@REM ---------------------------------------------------------------------------- |
|
||||
@REM Maven Start Up Batch script |
|
||||
@REM |
|
||||
@REM Required ENV vars: |
|
||||
@REM JAVA_HOME - location of a JDK home dir |
|
||||
@REM |
|
||||
@REM Optional ENV vars |
|
||||
@REM M2_HOME - location of maven2's installed home dir |
|
||||
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands |
|
||||
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending |
|
||||
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven |
|
||||
@REM e.g. to debug Maven itself, use |
|
||||
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
|
||||
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files |
|
||||
@REM ---------------------------------------------------------------------------- |
|
||||
|
|
||||
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' |
|
||||
@echo off |
|
||||
@REM set title of command window |
|
||||
title %0 |
|
||||
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' |
|
||||
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% |
|
||||
|
|
||||
@REM set %HOME% to equivalent of $HOME |
|
||||
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") |
|
||||
|
|
||||
@REM Execute a user defined script before this one |
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre |
|
||||
@REM check for pre script, once with legacy .bat ending and once with .cmd ending |
|
||||
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" |
|
||||
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" |
|
||||
:skipRcPre |
|
||||
|
|
||||
@setlocal |
|
||||
|
|
||||
set ERROR_CODE=0 |
|
||||
|
|
||||
@REM To isolate internal variables from possible post scripts, we use another setlocal |
|
||||
@setlocal |
|
||||
|
|
||||
@REM ==== START VALIDATION ==== |
|
||||
if not "%JAVA_HOME%" == "" goto OkJHome |
|
||||
|
|
||||
echo. |
|
||||
echo Error: JAVA_HOME not found in your environment. >&2 |
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2 |
|
||||
echo location of your Java installation. >&2 |
|
||||
echo. |
|
||||
goto error |
|
||||
|
|
||||
:OkJHome |
|
||||
if exist "%JAVA_HOME%\bin\java.exe" goto init |
|
||||
|
|
||||
echo. |
|
||||
echo Error: JAVA_HOME is set to an invalid directory. >&2 |
|
||||
echo JAVA_HOME = "%JAVA_HOME%" >&2 |
|
||||
echo Please set the JAVA_HOME variable in your environment to match the >&2 |
|
||||
echo location of your Java installation. >&2 |
|
||||
echo. |
|
||||
goto error |
|
||||
|
|
||||
@REM ==== END VALIDATION ==== |
|
||||
|
|
||||
:init |
|
||||
|
|
||||
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". |
|
||||
@REM Fallback to current working directory if not found. |
|
||||
|
|
||||
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% |
|
||||
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir |
|
||||
|
|
||||
set EXEC_DIR=%CD% |
|
||||
set WDIR=%EXEC_DIR% |
|
||||
:findBaseDir |
|
||||
IF EXIST "%WDIR%"\.mvn goto baseDirFound |
|
||||
cd .. |
|
||||
IF "%WDIR%"=="%CD%" goto baseDirNotFound |
|
||||
set WDIR=%CD% |
|
||||
goto findBaseDir |
|
||||
|
|
||||
:baseDirFound |
|
||||
set MAVEN_PROJECTBASEDIR=%WDIR% |
|
||||
cd "%EXEC_DIR%" |
|
||||
goto endDetectBaseDir |
|
||||
|
|
||||
:baseDirNotFound |
|
||||
set MAVEN_PROJECTBASEDIR=%EXEC_DIR% |
|
||||
cd "%EXEC_DIR%" |
|
||||
|
|
||||
:endDetectBaseDir |
|
||||
|
|
||||
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig |
|
||||
|
|
||||
@setlocal EnableExtensions EnableDelayedExpansion |
|
||||
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a |
|
||||
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% |
|
||||
|
|
||||
:endReadAdditionalConfig |
|
||||
|
|
||||
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" |
|
||||
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" |
|
||||
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
|
||||
|
|
||||
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|
||||
|
|
||||
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( |
|
||||
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B |
|
||||
) |
|
||||
|
|
||||
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
|
||||
@REM This allows using the maven wrapper in projects that prohibit checking in binary data. |
|
||||
if exist %WRAPPER_JAR% ( |
|
||||
if "%MVNW_VERBOSE%" == "true" ( |
|
||||
echo Found %WRAPPER_JAR% |
|
||||
) |
|
||||
) else ( |
|
||||
if not "%MVNW_REPOURL%" == "" ( |
|
||||
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
|
||||
) |
|
||||
if "%MVNW_VERBOSE%" == "true" ( |
|
||||
echo Couldn't find %WRAPPER_JAR%, downloading it ... |
|
||||
echo Downloading from: %DOWNLOAD_URL% |
|
||||
) |
|
||||
|
|
||||
powershell -Command "&{"^ |
|
||||
"$webclient = new-object System.Net.WebClient;"^ |
|
||||
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ |
|
||||
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ |
|
||||
"}"^ |
|
||||
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ |
|
||||
"}" |
|
||||
if "%MVNW_VERBOSE%" == "true" ( |
|
||||
echo Finished downloading %WRAPPER_JAR% |
|
||||
) |
|
||||
) |
|
||||
@REM End of extension |
|
||||
|
|
||||
@REM Provide a "standardized" way to retrieve the CLI args that will |
|
||||
@REM work with both Windows and non-Windows executions. |
|
||||
set MAVEN_CMD_LINE_ARGS=%* |
|
||||
|
|
||||
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* |
|
||||
if ERRORLEVEL 1 goto error |
|
||||
goto end |
|
||||
|
|
||||
:error |
|
||||
set ERROR_CODE=1 |
|
||||
|
|
||||
:end |
|
||||
@endlocal & set ERROR_CODE=%ERROR_CODE% |
|
||||
|
|
||||
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost |
|
||||
@REM check for post script, once with legacy .bat ending and once with .cmd ending |
|
||||
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" |
|
||||
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" |
|
||||
:skipRcPost |
|
||||
|
|
||||
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' |
|
||||
if "%MAVEN_BATCH_PAUSE%" == "on" pause |
|
||||
|
|
||||
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% |
|
||||
|
|
||||
exit /B %ERROR_CODE% |
|
@ -1,31 +0,0 @@ |
|||||
package com.ccsens.dh_ptos; |
|
||||
|
|
||||
import com.ccsens.cloudutil.ribbon.RibbonConfiguration; |
|
||||
import org.mybatis.spring.annotation.MapperScan; |
|
||||
import org.springframework.boot.SpringApplication; |
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|
||||
import org.springframework.boot.web.servlet.ServletComponentScan; |
|
||||
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; |
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients; |
|
||||
import org.springframework.context.annotation.ComponentScan; |
|
||||
import org.springframework.context.annotation.FilterType; |
|
||||
import org.springframework.scheduling.annotation.EnableAsync; |
|
||||
|
|
||||
/** |
|
||||
* @author 逗 |
|
||||
*/ |
|
||||
@MapperScan(basePackages = {"com.ccsens.dh_ptos.persist.*","com.ccsens.common.persist.*"}) |
|
||||
@ServletComponentScan |
|
||||
@EnableAsync |
|
||||
//开启断路器功能
|
|
||||
@EnableCircuitBreaker |
|
||||
@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign") |
|
||||
@SpringBootApplication |
|
||||
@ComponentScan(basePackages = "com.ccsens", excludeFilters = { @ComponentScan.Filter(type= FilterType.ASSIGNABLE_TYPE, value = RibbonConfiguration.class)}) |
|
||||
public class DhPtosApplication { |
|
||||
|
|
||||
public static void main(String[] args) { |
|
||||
SpringApplication.run(DhPtosApplication.class, args); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,32 +0,0 @@ |
|||||
package com.ccsens.dh_ptos.api; |
|
||||
|
|
||||
import com.ccsens.util.JsonResponse; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiImplicitParams; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
import org.springframework.web.bind.annotation.RequestMethod; |
|
||||
import org.springframework.web.bind.annotation.RestController; |
|
||||
|
|
||||
import javax.servlet.http.HttpServletRequest; |
|
||||
|
|
||||
/** |
|
||||
* @author 逗 |
|
||||
*/ |
|
||||
@Api(tags = "DEBUG" , description = "DebugController | ") |
|
||||
@RestController |
|
||||
@RequestMapping("/debug") |
|
||||
@Slf4j |
|
||||
public class DebugController { |
|
||||
|
|
||||
@ApiOperation(value = "/测试",notes = "") |
|
||||
@ApiImplicitParams({ |
|
||||
}) |
|
||||
@RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
|
||||
public JsonResponse debug(HttpServletRequest request) throws Exception { |
|
||||
|
|
||||
return JsonResponse.newInstance().ok("测试"); |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,41 +0,0 @@ |
|||||
package com.ccsens.dh_ptos.api; |
|
||||
|
|
||||
import com.ccsens.dh_ptos.bean.dto.ProjectDto; |
|
||||
import com.ccsens.dh_ptos.bean.vo.ProjectVo; |
|
||||
import com.ccsens.dh_ptos.service.IProjectService; |
|
||||
import com.ccsens.util.JsonResponse; |
|
||||
import com.ccsens.util.bean.dto.QueryDto; |
|
||||
import io.swagger.annotations.Api; |
|
||||
import io.swagger.annotations.ApiOperation; |
|
||||
import io.swagger.annotations.ApiParam; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.springframework.validation.annotation.Validated; |
|
||||
import org.springframework.web.bind.annotation.RequestBody; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
import org.springframework.web.bind.annotation.RequestMethod; |
|
||||
import org.springframework.web.bind.annotation.RestController; |
|
||||
|
|
||||
import javax.annotation.Resource; |
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author 逗 |
|
||||
*/ |
|
||||
@Api(tags = "project" , description = "项目相关接口") |
|
||||
@RestController |
|
||||
@RequestMapping("/project") |
|
||||
@Slf4j |
|
||||
public class ProjectController { |
|
||||
|
|
||||
@Resource |
|
||||
private IProjectService projectService; |
|
||||
|
|
||||
@ApiOperation(value = "查询用户所有域下所有业务内的所有项目", notes = "") |
|
||||
@RequestMapping(value = "/query", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
||||
public JsonResponse<List<ProjectVo.DomainInfo>> queryDomainByUser(@ApiParam @Validated @RequestBody QueryDto<ProjectDto.QueryProjectDto> params) throws Exception{ |
|
||||
log.info("查询用户所有域下所有业务内的所有项目:{}",params); |
|
||||
List<ProjectVo.DomainInfo> domainInfoList = projectService.queryDomainByUser(params.getParam(),params.getUserId()); |
|
||||
log.info("查询用户所有域下所有业务内的所有项目"); |
|
||||
return JsonResponse.newInstance().ok(domainInfoList); |
|
||||
} |
|
||||
} |
|
@ -1,18 +0,0 @@ |
|||||
package com.ccsens.dh_ptos.api; |
|
||||
|
|
||||
import io.swagger.annotations.Api; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.springframework.web.bind.annotation.RequestMapping; |
|
||||
import org.springframework.web.bind.annotation.RestController; |
|
||||
|
|
||||
/** |
|
||||
* @author 逗 |
|
||||
*/ |
|
||||
@Api(tags = "user" , description = "用户信息相关接口") |
|
||||
@RestController |
|
||||
@RequestMapping("/user") |
|
||||
@Slf4j |
|
||||
public class UserController { |
|
||||
|
|
||||
|
|
||||
} |
|
@ -1,22 +0,0 @@ |
|||||
package com.ccsens.dh_ptos.bean.dto; |
|
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
/** |
|
||||
* @author 逗 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class ProjectDto { |
|
||||
|
|
||||
@Data |
|
||||
@ApiModel("用户查询可见的项目") |
|
||||
public static class QueryProjectDto{ |
|
||||
@ApiModelProperty("开始时间") |
|
||||
private Long startTime; |
|
||||
@ApiModelProperty("结束时间") |
|
||||
private Long endTime; |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,86 +0,0 @@ |
|||||
package com.ccsens.dh_ptos.bean.vo; |
|
||||
|
|
||||
import cn.hutool.core.util.ObjectUtil; |
|
||||
import com.ccsens.util.WebConstant; |
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
import lombok.Data; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author 逗 |
|
||||
*/ |
|
||||
@Data |
|
||||
public class ProjectVo { |
|
||||
|
|
||||
@Data |
|
||||
@ApiModel("域信息") |
|
||||
public static class DomainInfo{ |
|
||||
@ApiModelProperty("id") |
|
||||
private Long id; |
|
||||
@ApiModelProperty("域名") |
|
||||
private String name; |
|
||||
@ApiModelProperty("域code") |
|
||||
private String code; |
|
||||
@ApiModelProperty("域访问前缀") |
|
||||
private String url; |
|
||||
@ApiModelProperty("是否是自身 0否 1是") |
|
||||
private byte self; |
|
||||
@ApiModelProperty("业务列表") |
|
||||
private List<BusinessInfo> businessList; |
|
||||
} |
|
||||
@Data |
|
||||
@ApiModel("业务信息") |
|
||||
public static class BusinessInfo{ |
|
||||
@ApiModelProperty("业务id") |
|
||||
private Long businessId; |
|
||||
@ApiModelProperty("业务名") |
|
||||
private String businessName; |
|
||||
@ApiModelProperty("业务code") |
|
||||
private String businessCode; |
|
||||
@ApiModelProperty("业务访问前缀") |
|
||||
private String url; |
|
||||
@ApiModelProperty("项目列表") |
|
||||
private List<ProjectInfo> projectList; |
|
||||
} |
|
||||
|
|
||||
@Data |
|
||||
@ApiModel("日历下项目列表信息") |
|
||||
public static class ProjectInfo{ |
|
||||
@ApiModelProperty("id") |
|
||||
private Long id; |
|
||||
@ApiModelProperty("项目名") |
|
||||
private String name; |
|
||||
@ApiModelProperty("开始时间") |
|
||||
private Long startTime; |
|
||||
@ApiModelProperty("结束时间") |
|
||||
private Long endTime; |
|
||||
@ApiModelProperty("项目完成状态(0-未开始,1-进行中,2-暂停,3-已完成)") |
|
||||
private byte status; |
|
||||
@ApiModelProperty("访问路径)") |
|
||||
private String url; |
|
||||
@ApiModelProperty("子项目") |
|
||||
private List<ProjectInfo> sonProjectList; |
|
||||
@JsonIgnore |
|
||||
@ApiModelProperty("父级id") |
|
||||
private Long parentId; |
|
||||
|
|
||||
public Byte getStatus() { |
|
||||
long current = System.currentTimeMillis(); |
|
||||
if(ObjectUtil.isNull(getStartTime()) || ObjectUtil.isNull(getEndTime())) { |
|
||||
return null; |
|
||||
} |
|
||||
if(getStartTime() > current){ |
|
||||
this.status = (byte) WebConstant.EVENT_PROCESS.Pending.value; |
|
||||
}else if(getEndTime() < current){ |
|
||||
this.status = (byte) WebConstant.EVENT_PROCESS.Expired.value; |
|
||||
}else{ |
|
||||
this.status = (byte) WebConstant.EVENT_PROCESS.Processing.value; |
|
||||
} |
|
||||
return this.status; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,159 +0,0 @@ |
|||||
package com.ccsens.dh_ptos.intercept; |
|
||||
|
|
||||
import cn.hutool.core.collection.CollectionUtil; |
|
||||
import com.ccsens.util.WebConstant; |
|
||||
import org.apache.ibatis.executor.Executor; |
|
||||
import org.apache.ibatis.mapping.BoundSql; |
|
||||
import org.apache.ibatis.mapping.MappedStatement; |
|
||||
import org.apache.ibatis.mapping.ResultMap; |
|
||||
import org.apache.ibatis.mapping.SqlSource; |
|
||||
import org.apache.ibatis.plugin.*; |
|
||||
import org.apache.ibatis.reflection.DefaultReflectorFactory; |
|
||||
import org.apache.ibatis.reflection.MetaObject; |
|
||||
import org.apache.ibatis.reflection.factory.DefaultObjectFactory; |
|
||||
import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory; |
|
||||
import org.apache.ibatis.session.ResultHandler; |
|
||||
import org.apache.ibatis.session.RowBounds; |
|
||||
|
|
||||
import java.lang.reflect.InvocationTargetException; |
|
||||
import java.lang.reflect.Method; |
|
||||
import java.util.List; |
|
||||
import java.util.Map; |
|
||||
import java.util.Properties; |
|
||||
|
|
||||
/** |
|
||||
* @description: |
|
||||
* @author: wuHuiJuan |
|
||||
* @create: 2019/12/11 10:58 |
|
||||
*/ |
|
||||
@Intercepts({ |
|
||||
@Signature( |
|
||||
type = Executor.class, |
|
||||
method = "query", |
|
||||
args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class} |
|
||||
) |
|
||||
}) |
|
||||
public class MybatisInterceptor implements Interceptor { |
|
||||
@Override |
|
||||
public Object intercept(Invocation invocation) throws Throwable { |
|
||||
|
|
||||
|
|
||||
String selectByExample = "selectByExample"; |
|
||||
String countByExample = "countByExample"; |
|
||||
String countByExample2 = "selectByExample_COUNT"; |
|
||||
String selectByPrimaryKey = "selectByPrimaryKey"; |
|
||||
|
|
||||
Object[] args = invocation.getArgs(); |
|
||||
MappedStatement statement = (MappedStatement) args[0]; |
|
||||
if (statement.getId().endsWith(selectByExample) |
|
||||
|| statement.getId().endsWith(countByExample) |
|
||||
|| statement.getId().endsWith(countByExample2)) { |
|
||||
//XXXExample
|
|
||||
Object example = args[1]; |
|
||||
|
|
||||
addCondition(statement, example); |
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
} else if (statement.getId().endsWith(selectByPrimaryKey)) { |
|
||||
BoundSql boundSql = statement.getBoundSql(args[1]); |
|
||||
String sql = boundSql.getSql() + " and rec_status = 0"; |
|
||||
MappedStatement newStatement = newMappedStatement(statement, new BoundSqlSqlSource(boundSql)); |
|
||||
MetaObject msObject = MetaObject.forObject(newStatement, new DefaultObjectFactory(), new DefaultObjectWrapperFactory(),new DefaultReflectorFactory()); |
|
||||
msObject.setValue("sqlSource.boundSql.sql", sql); |
|
||||
args[0] = newStatement; |
|
||||
} |
|
||||
|
|
||||
return invocation.proceed(); |
|
||||
} |
|
||||
|
|
||||
private void addCondition(MappedStatement statement, Object example) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException { |
|
||||
if (example instanceof Map) { |
|
||||
example = ((Map) example).get("_ORIGINAL_PARAMETER_OBJECT"); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
Method method = example.getClass().getMethod("getOredCriteria", null); |
|
||||
//获取到条件数组,第一个是Criteria
|
|
||||
List list = (List) method.invoke(example); |
|
||||
if (CollectionUtil.isEmpty(list)) { |
|
||||
Class clazz = ((ResultMap) statement.getResultMaps().get(0)).getType(); |
|
||||
String exampleName = clazz.getName() + "Example"; |
|
||||
Object paramExample = Class.forName(exampleName).newInstance(); |
|
||||
Method createCriteria = paramExample.getClass().getMethod("createCriteria"); |
|
||||
Object criteria = createCriteria.invoke(paramExample); |
|
||||
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); |
|
||||
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); |
|
||||
list.add(criteria); |
|
||||
} else { |
|
||||
Object criteria = list.get(0); |
|
||||
Method getCriteria = criteria.getClass().getMethod("getCriteria"); |
|
||||
List params = (List) getCriteria.invoke(criteria); |
|
||||
boolean hasDel = false; |
|
||||
for (Object param : params) { |
|
||||
Method getCondition = param.getClass().getMethod("getCondition"); |
|
||||
Object condition = getCondition.invoke(param); |
|
||||
if ("rec_status =".equals(condition)) { |
|
||||
hasDel = true; |
|
||||
} |
|
||||
} |
|
||||
if (!hasDel) { |
|
||||
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); |
|
||||
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public Object plugin(Object target) { |
|
||||
return Plugin.wrap(target, this); |
|
||||
} |
|
||||
|
|
||||
@Override |
|
||||
public void setProperties(Properties properties) { |
|
||||
|
|
||||
} |
|
||||
|
|
||||
private MappedStatement newMappedStatement(MappedStatement ms, SqlSource newSqlSource) { |
|
||||
MappedStatement.Builder builder = |
|
||||
new MappedStatement.Builder(ms.getConfiguration(), ms.getId(), newSqlSource, ms.getSqlCommandType()); |
|
||||
builder.resource(ms.getResource()); |
|
||||
builder.fetchSize(ms.getFetchSize()); |
|
||||
builder.statementType(ms.getStatementType()); |
|
||||
builder.keyGenerator(ms.getKeyGenerator()); |
|
||||
if (ms.getKeyProperties() != null && ms.getKeyProperties().length != 0) { |
|
||||
StringBuilder keyProperties = new StringBuilder(); |
|
||||
for (String keyProperty : ms.getKeyProperties()) { |
|
||||
keyProperties.append(keyProperty).append(","); |
|
||||
} |
|
||||
keyProperties.delete(keyProperties.length() - 1, keyProperties.length()); |
|
||||
builder.keyProperty(keyProperties.toString()); |
|
||||
} |
|
||||
builder.timeout(ms.getTimeout()); |
|
||||
builder.parameterMap(ms.getParameterMap()); |
|
||||
builder.resultMaps(ms.getResultMaps()); |
|
||||
builder.resultSetType(ms.getResultSetType()); |
|
||||
builder.cache(ms.getCache()); |
|
||||
builder.flushCacheRequired(ms.isFlushCacheRequired()); |
|
||||
builder.useCache(ms.isUseCache()); |
|
||||
|
|
||||
return builder.build(); |
|
||||
} |
|
||||
|
|
||||
|
|
||||
// 定义一个内部辅助类,作用是包装sq
|
|
||||
class BoundSqlSqlSource implements SqlSource { |
|
||||
private BoundSql boundSql; |
|
||||
public BoundSqlSqlSource(BoundSql boundSql) { |
|
||||
this.boundSql = boundSql; |
|
||||
} |
|
||||
@Override |
|
||||
public BoundSql getBoundSql(Object parameterObject) { |
|
||||
return boundSql; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
} |
|
@ -1,19 +0,0 @@ |
|||||
package com.ccsens.dh_ptos.service; |
|
||||
|
|
||||
import com.ccsens.dh_ptos.bean.dto.ProjectDto; |
|
||||
import com.ccsens.dh_ptos.bean.vo.ProjectVo; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
/** |
|
||||
* @author 逗 |
|
||||
*/ |
|
||||
public interface IProjectService { |
|
||||
/** |
|
||||
* 查询用户在所有域所有业务下的所有项目 |
|
||||
* @param param 开始结束时间 |
|
||||
* @param userId userId |
|
||||
* @return 返回项目列表 |
|
||||
*/ |
|
||||
List<ProjectVo.DomainInfo> queryDomainByUser(ProjectDto.QueryProjectDto param, Long userId); |
|
||||
} |
|
@ -1,25 +0,0 @@ |
|||||
package com.ccsens.dh_ptos.service; |
|
||||
|
|
||||
import com.ccsens.dh_ptos.bean.dto.ProjectDto; |
|
||||
import com.ccsens.dh_ptos.bean.vo.ProjectVo; |
|
||||
import lombok.extern.slf4j.Slf4j; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
import org.springframework.transaction.annotation.Propagation; |
|
||||
import org.springframework.transaction.annotation.Transactional; |
|
||||
|
|
||||
import java.util.List; |
|
||||
/** |
|
||||
* @author 逗 |
|
||||
*/ |
|
||||
@Slf4j |
|
||||
@Service |
|
||||
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class) |
|
||||
public class ProjectService implements IProjectService { |
|
||||
|
|
||||
|
|
||||
@Override |
|
||||
public List<ProjectVo.DomainInfo> queryDomainByUser(ProjectDto.QueryProjectDto param, Long userId) { |
|
||||
|
|
||||
return null; |
|
||||
} |
|
||||
} |
|
@ -1,30 +0,0 @@ |
|||||
logging: |
|
||||
level: |
|
||||
com: |
|
||||
favorites: DEBUG |
|
||||
org: |
|
||||
hibernate: ERROR |
|
||||
springframework: |
|
||||
web: DEBUG |
|
||||
mybatis: |
|
||||
config-location: classpath:mybatis/mybatis-config.xml |
|
||||
mapper-locations: classpath*:mapper_*/*.xml |
|
||||
# type-aliases-package: com.ccsens.mtpro.bean |
|
||||
#server: |
|
||||
# tomcat: |
|
||||
# uri-encoding: UTF-8 |
|
||||
spring: |
|
||||
http: |
|
||||
encoding: |
|
||||
charset: UTF-8 |
|
||||
enabled: true |
|
||||
force: true |
|
||||
log-request-details: true |
|
||||
servlet: |
|
||||
multipart: |
|
||||
max-file-size: 10MB |
|
||||
max-request-size: 100MB |
|
||||
snowflake: |
|
||||
datacenterId: 10 |
|
||||
workerId: 1 |
|
||||
|
|
@ -1,4 +0,0 @@ |
|||||
spring: |
|
||||
profiles: |
|
||||
active: dev |
|
||||
include: common, util-dev |
|
@ -1,34 +0,0 @@ |
|||||
spring: |
|
||||
datasource: |
|
||||
druid: |
|
||||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
|
||||
driverClassName: com.mysql.cj.jdbc.Driver |
|
||||
dynamicUrl: jdbc:mysql://localhost:3306/${schema} |
|
||||
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' |
|
||||
filterName: druidFilter |
|
||||
filterProfileEnable: true |
|
||||
filterUrlPattern: /* |
|
||||
filters: stat,wall |
|
||||
initialSize: 5 |
|
||||
maxActive: 20 |
|
||||
maxPoolPreparedStatementPerConnectionSize: 20 |
|
||||
maxWait: 60000 |
|
||||
minEvictableIdleTimeMillis: 300000 |
|
||||
minIdle: 5 |
|
||||
# password: 37080c1f223685592316b02dad8816c019290a476e54ebb638f9aa3ba8b6bdb9 |
|
||||
password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 |
|
||||
poolPreparedStatements: true |
|
||||
servletLogSlowSql: true |
|
||||
servletLoginPassword: 111111 |
|
||||
servletLoginUsername: druid |
|
||||
servletName: druidServlet |
|
||||
servletResetEnable: true |
|
||||
servletUrlMapping: /druid/* |
|
||||
testOnBorrow: false |
|
||||
testOnReturn: false |
|
||||
testWhileIdle: true |
|
||||
timeBetweenEvictionRunsMillis: 60000 |
|
||||
url: jdbc:mysql://101.201.226.163:3306/dh_ht?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true |
|
||||
username: root |
|
||||
validationQuery: SELECT 1 FROM DUAL |
|
||||
env: CCSENS_TALL |
|
@ -1,35 +0,0 @@ |
|||||
spring: |
|
||||
datasource: |
|
||||
druid: |
|
||||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
|
||||
driverClassName: com.mysql.cj.jdbc.Driver |
|
||||
dynamicUrl: jdbc:mysql://localhost:3306/${schema} |
|
||||
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' |
|
||||
filterName: druidFilter |
|
||||
filterProfileEnable: true |
|
||||
filterUrlPattern: /* |
|
||||
filters: stat,wall |
|
||||
initialSize: 5 |
|
||||
maxActive: 20 |
|
||||
maxPoolPreparedStatementPerConnectionSize: 20 |
|
||||
maxWait: 60000 |
|
||||
minEvictableIdleTimeMillis: 300000 |
|
||||
minIdle: 5 |
|
||||
# password: |
|
||||
password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 |
|
||||
poolPreparedStatements: true |
|
||||
servletLogSlowSql: true |
|
||||
servletLoginPassword: 111111 |
|
||||
servletLoginUsername: druid |
|
||||
servletName: druidServlet |
|
||||
servletResetEnable: true |
|
||||
servletUrlMapping: /druid/* |
|
||||
testOnBorrow: false |
|
||||
testOnReturn: false |
|
||||
testWhileIdle: true |
|
||||
timeBetweenEvictionRunsMillis: 60000 |
|
||||
# url: jdbc:mysql://127.0.0.1/defaultwbs?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true |
|
||||
url: jdbc:mysql://www.tall.wiki/data_centre?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true |
|
||||
username: root |
|
||||
validationQuery: SELECT 1 FROM DUAL |
|
||||
env: CCSENS_TALL |
|
@ -1,34 +0,0 @@ |
|||||
spring: |
|
||||
datasource: |
|
||||
druid: |
|
||||
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
|
||||
driverClassName: com.mysql.cj.jdbc.Driver |
|
||||
dynamicUrl: jdbc:mysql://localhost:3306/${schema} |
|
||||
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' |
|
||||
filterName: druidFilter |
|
||||
filterProfileEnable: true |
|
||||
filterUrlPattern: /* |
|
||||
filters: stat,wall |
|
||||
initialSize: 5 |
|
||||
maxActive: 20 |
|
||||
maxPoolPreparedStatementPerConnectionSize: 20 |
|
||||
maxWait: 60000 |
|
||||
minEvictableIdleTimeMillis: 300000 |
|
||||
minIdle: 5 |
|
||||
# password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 |
|
||||
password: |
|
||||
poolPreparedStatements: true |
|
||||
servletLogSlowSql: true |
|
||||
servletLoginPassword: 111111 |
|
||||
servletLoginUsername: druid |
|
||||
servletName: druidServlet |
|
||||
servletResetEnable: true |
|
||||
servletUrlMapping: /druid/* |
|
||||
testOnBorrow: false |
|
||||
testOnReturn: false |
|
||||
testWhileIdle: true |
|
||||
timeBetweenEvictionRunsMillis: 60000 |
|
||||
url: jdbc:mysql://101.201.226.163:3306/tall_dm?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true |
|
||||
username: root |
|
||||
validationQuery: SELECT 1 FROM DUAL |
|
||||
env: CCSENS_TALL |
|
@ -1,62 +0,0 @@ |
|||||
<?xml version="1.0" encoding="UTF-8" ?> |
|
||||
<!DOCTYPE configuration |
|
||||
PUBLIC "-//mybatis.org//DTD Config 3.0//EN" |
|
||||
"http://mybatis.org/dtd/mybatis-3-config.dtd"> |
|
||||
|
|
||||
<configuration> |
|
||||
<!-- 全局参数 --> |
|
||||
<settings> |
|
||||
<!-- 打印SQL语句 --> |
|
||||
<setting name="logImpl" value="STDOUT_LOGGING" /> |
|
||||
<!-- 使全局的映射器启用或禁用缓存。 --> |
|
||||
<setting name="cacheEnabled" value="true"/> |
|
||||
<!-- 全局启用或禁用延迟加载。当禁用时,所有关联对象都会即时加载。 --> |
|
||||
<setting name="lazyLoadingEnabled" value="true"/> |
|
||||
<!-- 当启用时,有延迟加载属性的对象在被调用时将会完全加载任意属性。否则,每种属性将会按需要加载。 --> |
|
||||
<setting name="aggressiveLazyLoading" value="true"/> |
|
||||
<!-- 是否允许单条sql 返回多个数据集 (取决于驱动的兼容性) default:true --> |
|
||||
<setting name="multipleResultSetsEnabled" value="true"/> |
|
||||
<!-- 是否可以使用列的别名 (取决于驱动的兼容性) default:true --> |
|
||||
<setting name="useColumnLabel" value="true"/> |
|
||||
<!-- 允许JDBC 生成主键。需要驱动器支持。如果设为了true,这个设置将强制使用被生成的主键,有一些驱动器不兼容不过仍然可以执行。 default:false --> |
|
||||
<setting name="useGeneratedKeys" value="true"/> |
|
||||
<!-- 指定 MyBatis 如何自动映射 数据基表的列 NONE:不隐射 PARTIAL:部分 FULL:全部 --> |
|
||||
<setting name="autoMappingBehavior" value="PARTIAL"/> |
|
||||
<!-- 这是默认的执行类型 (SIMPLE: 简单; REUSE: 执行器可能重复使用prepared statements语句;BATCH: 执行器可以重复执行语句和批量更新) --> |
|
||||
<setting name="defaultExecutorType" value="SIMPLE"/> |
|
||||
<!-- 使用驼峰命名法转换字段。 --> |
|
||||
<setting name="mapUnderscoreToCamelCase" value="true"/> |
|
||||
<!-- 设置本地缓存范围 session:就会有数据的共享 statement:语句范围 (这样就不会有数据的共享 ) defalut:session --> |
|
||||
<setting name="localCacheScope" value="SESSION"/> |
|
||||
<!-- 设置但JDBC类型为空时,某些驱动程序 要指定值,default:OTHER,插入空值时不需要指定类型 --> |
|
||||
<setting name="jdbcTypeForNull" value="NULL"/> |
|
||||
</settings> |
|
||||
|
|
||||
<typeAliases> |
|
||||
<typeAlias alias="Integer" type="java.lang.Integer" /> |
|
||||
<typeAlias alias="Long" type="java.lang.Long" /> |
|
||||
<typeAlias alias="HashMap" type="java.util.HashMap" /> |
|
||||
<typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap" /> |
|
||||
<typeAlias alias="ArrayList" type="java.util.ArrayList" /> |
|
||||
<typeAlias alias="LinkedList" type="java.util.LinkedList" /> |
|
||||
<typeAlias alias="String" type="java.lang.String" /> |
|
||||
</typeAliases> |
|
||||
|
|
||||
<plugins> |
|
||||
<!-- com.github.pagehelper为PageHelper类所在包名 --> |
|
||||
<plugin interceptor="com.github.pagehelper.PageHelper"> |
|
||||
<property name="dialect" value="mysql"/> |
|
||||
<!-- 该参数默认为false --> |
|
||||
<!-- 设置为true时,会将RowBounds第一个参数offset当成pageNum页码使用 --> |
|
||||
<!-- 和startPage中的pageNum效果一样--> |
|
||||
<property name="offsetAsPageNum" value="false"/> |
|
||||
<!-- 该参数默认为false --> |
|
||||
<!-- 设置为true时,使用RowBounds分页会进行count查询 --> |
|
||||
<property name="rowBoundsWithCount" value="false"/> |
|
||||
<property name="pageSizeZero" value="true"/> |
|
||||
<property name="reasonable" value="false"/> |
|
||||
<property name="supportMethodsArguments" value="false"/> |
|
||||
<property name="returnPageInfo" value="none"/> |
|
||||
</plugin> |
|
||||
</plugins> |
|
||||
</configuration> |
|
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.api; |
package com.ccsens.ptos_diplomatist.api; |
||||
|
|
||||
import com.ccsens.util.JsonResponse; |
import com.ccsens.util.JsonResponse; |
||||
import io.swagger.annotations.Api; |
import io.swagger.annotations.Api; |
@ -1,10 +1,10 @@ |
|||||
package com.ccsens.dh_diplomatist.api; |
package com.ccsens.ptos_diplomatist.api; |
||||
|
|
||||
import cn.hutool.extra.servlet.ServletUtil; |
import cn.hutool.extra.servlet.ServletUtil; |
||||
import com.ccsens.dh_diplomatist.bean.dto.HeartbeatDto; |
import com.ccsens.ptos_diplomatist.bean.dto.HeartbeatDto; |
||||
import com.ccsens.dh_diplomatist.bean.dto.UserDto; |
import com.ccsens.ptos_diplomatist.bean.dto.UserDto; |
||||
import com.ccsens.dh_diplomatist.bean.vo.DomainVo; |
import com.ccsens.ptos_diplomatist.bean.vo.DomainVo; |
||||
import com.ccsens.dh_diplomatist.service.IDomainService; |
import com.ccsens.ptos_diplomatist.service.IDomainService; |
||||
import com.ccsens.util.JsonResponse; |
import com.ccsens.util.JsonResponse; |
||||
import io.swagger.annotations.Api; |
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
import io.swagger.annotations.ApiOperation; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.api; |
package com.ccsens.ptos_diplomatist.api; |
||||
|
|
||||
import io.swagger.annotations.Api; |
import io.swagger.annotations.Api; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.dto; |
package com.ccsens.ptos_diplomatist.bean.dto; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.dto; |
package com.ccsens.ptos_diplomatist.bean.dto; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.po; |
package com.ccsens.ptos_diplomatist.bean.po; |
||||
|
|
||||
import java.io.Serializable; |
import java.io.Serializable; |
||||
import java.util.Date; |
import java.util.Date; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.po; |
package com.ccsens.ptos_diplomatist.bean.po; |
||||
|
|
||||
import java.util.ArrayList; |
import java.util.ArrayList; |
||||
import java.util.Date; |
import java.util.Date; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.po; |
package com.ccsens.ptos_diplomatist.bean.po; |
||||
|
|
||||
import java.io.Serializable; |
import java.io.Serializable; |
||||
import java.util.Date; |
import java.util.Date; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.po; |
package com.ccsens.ptos_diplomatist.bean.po; |
||||
|
|
||||
import java.io.Serializable; |
import java.io.Serializable; |
||||
import java.util.Date; |
import java.util.Date; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.po; |
package com.ccsens.ptos_diplomatist.bean.po; |
||||
|
|
||||
import java.util.ArrayList; |
import java.util.ArrayList; |
||||
import java.util.Date; |
import java.util.Date; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.po; |
package com.ccsens.ptos_diplomatist.bean.po; |
||||
|
|
||||
import java.util.ArrayList; |
import java.util.ArrayList; |
||||
import java.util.Date; |
import java.util.Date; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.po; |
package com.ccsens.ptos_diplomatist.bean.po; |
||||
|
|
||||
import java.io.Serializable; |
import java.io.Serializable; |
||||
import java.util.Date; |
import java.util.Date; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.po; |
package com.ccsens.ptos_diplomatist.bean.po; |
||||
|
|
||||
import java.io.Serializable; |
import java.io.Serializable; |
||||
import java.util.Date; |
import java.util.Date; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.po; |
package com.ccsens.ptos_diplomatist.bean.po; |
||||
|
|
||||
import java.util.ArrayList; |
import java.util.ArrayList; |
||||
import java.util.Date; |
import java.util.Date; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.po; |
package com.ccsens.ptos_diplomatist.bean.po; |
||||
|
|
||||
import java.util.ArrayList; |
import java.util.ArrayList; |
||||
import java.util.Date; |
import java.util.Date; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.bean.vo; |
package com.ccsens.ptos_diplomatist.bean.vo; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
@ -1,6 +1,6 @@ |
|||||
package com.ccsens.dh_diplomatist.config; |
package com.ccsens.ptos_diplomatist.config; |
||||
|
|
||||
import com.ccsens.dh_diplomatist.intercept.MybatisInterceptor; |
import com.ccsens.ptos_diplomatist.intercept.MybatisInterceptor; |
||||
import org.springframework.context.annotation.Bean; |
import org.springframework.context.annotation.Bean; |
||||
import org.springframework.context.annotation.Configuration; |
import org.springframework.context.annotation.Configuration; |
||||
|
|
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.intercept; |
package com.ccsens.ptos_diplomatist.intercept; |
||||
|
|
||||
import cn.hutool.core.collection.CollectionUtil; |
import cn.hutool.core.collection.CollectionUtil; |
||||
import com.ccsens.util.WebConstant; |
import com.ccsens.util.WebConstant; |
@ -1,8 +1,8 @@ |
|||||
package com.ccsens.dh_diplomatist.persist.dao; |
package com.ccsens.ptos_diplomatist.persist.dao; |
||||
|
|
||||
import com.ccsens.dh_diplomatist.bean.po.IdcDomain; |
import com.ccsens.ptos_diplomatist.bean.po.IdcDomain; |
||||
import com.ccsens.dh_diplomatist.bean.vo.DomainVo; |
import com.ccsens.ptos_diplomatist.bean.vo.DomainVo; |
||||
import com.ccsens.dh_diplomatist.persist.mapper.IdcDomainMapper; |
import com.ccsens.ptos_diplomatist.persist.mapper.IdcDomainMapper; |
||||
import org.apache.ibatis.annotations.Param; |
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
@ -1,7 +1,7 @@ |
|||||
package com.ccsens.dh_diplomatist.persist.mapper; |
package com.ccsens.ptos_diplomatist.persist.mapper; |
||||
|
|
||||
import com.ccsens.dh_diplomatist.bean.po.IdcBusiness; |
import com.ccsens.ptos_diplomatist.bean.po.IdcBusiness; |
||||
import com.ccsens.dh_diplomatist.bean.po.IdcBusinessExample; |
import com.ccsens.ptos_diplomatist.bean.po.IdcBusinessExample; |
||||
import java.util.List; |
import java.util.List; |
||||
import org.apache.ibatis.annotations.Param; |
import org.apache.ibatis.annotations.Param; |
||||
|
|
@ -1,7 +1,7 @@ |
|||||
package com.ccsens.dh_diplomatist.persist.mapper; |
package com.ccsens.ptos_diplomatist.persist.mapper; |
||||
|
|
||||
import com.ccsens.dh_diplomatist.bean.po.IdcDomainBusiness; |
import com.ccsens.ptos_diplomatist.bean.po.IdcDomainBusiness; |
||||
import com.ccsens.dh_diplomatist.bean.po.IdcDomainBusinessExample; |
import com.ccsens.ptos_diplomatist.bean.po.IdcDomainBusinessExample; |
||||
import java.util.List; |
import java.util.List; |
||||
import org.apache.ibatis.annotations.Param; |
import org.apache.ibatis.annotations.Param; |
||||
|
|
@ -1,7 +1,7 @@ |
|||||
package com.ccsens.dh_diplomatist.persist.mapper; |
package com.ccsens.ptos_diplomatist.persist.mapper; |
||||
|
|
||||
import com.ccsens.dh_diplomatist.bean.po.IdcDomain; |
import com.ccsens.ptos_diplomatist.bean.po.IdcDomain; |
||||
import com.ccsens.dh_diplomatist.bean.po.IdcDomainExample; |
import com.ccsens.ptos_diplomatist.bean.po.IdcDomainExample; |
||||
import java.util.List; |
import java.util.List; |
||||
import org.apache.ibatis.annotations.Param; |
import org.apache.ibatis.annotations.Param; |
||||
|
|
@ -1,7 +1,7 @@ |
|||||
package com.ccsens.dh_diplomatist.persist.mapper; |
package com.ccsens.ptos_diplomatist.persist.mapper; |
||||
|
|
||||
import com.ccsens.dh_diplomatist.bean.po.IdcUserDomain; |
import com.ccsens.ptos_diplomatist.bean.po.IdcUserDomain; |
||||
import com.ccsens.dh_diplomatist.bean.po.IdcUserDomainExample; |
import com.ccsens.ptos_diplomatist.bean.po.IdcUserDomainExample; |
||||
import java.util.List; |
import java.util.List; |
||||
import org.apache.ibatis.annotations.Param; |
import org.apache.ibatis.annotations.Param; |
||||
|
|
@ -1,7 +1,7 @@ |
|||||
package com.ccsens.dh_diplomatist.persist.mapper; |
package com.ccsens.ptos_diplomatist.persist.mapper; |
||||
|
|
||||
import com.ccsens.dh_diplomatist.bean.po.IdcUser; |
import com.ccsens.ptos_diplomatist.bean.po.IdcUser; |
||||
import com.ccsens.dh_diplomatist.bean.po.IdcUserExample; |
import com.ccsens.ptos_diplomatist.bean.po.IdcUserExample; |
||||
import java.util.List; |
import java.util.List; |
||||
import org.apache.ibatis.annotations.Param; |
import org.apache.ibatis.annotations.Param; |
||||
|
|
@ -1,7 +1,7 @@ |
|||||
package com.ccsens.dh_diplomatist.service; |
package com.ccsens.ptos_diplomatist.service; |
||||
|
|
||||
import com.ccsens.dh_diplomatist.bean.dto.HeartbeatDto; |
import com.ccsens.ptos_diplomatist.bean.dto.HeartbeatDto; |
||||
import com.ccsens.dh_diplomatist.bean.vo.DomainVo; |
import com.ccsens.ptos_diplomatist.bean.vo.DomainVo; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
||||
|
|
@ -1,6 +1,6 @@ |
|||||
package com.ccsens.dh_diplomatist.service; |
package com.ccsens.ptos_diplomatist.service; |
||||
|
|
||||
import com.ccsens.dh_diplomatist.bean.dto.HeartbeatDto; |
import com.ccsens.ptos_diplomatist.bean.dto.HeartbeatDto; |
||||
|
|
||||
/** |
/** |
||||
* @author 逗 |
* @author 逗 |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.util; |
package com.ccsens.ptos_diplomatist.util; |
||||
|
|
||||
import com.ccsens.util.CodeError; |
import com.ccsens.util.CodeError; |
||||
|
|
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_diplomatist.util; |
package com.ccsens.ptos_diplomatist.util; |
||||
|
|
||||
import java.util.HashMap; |
import java.util.HashMap; |
||||
import java.util.Map; |
import java.util.Map; |
@ -0,0 +1,4 @@ |
|||||
|
spring: |
||||
|
profiles: |
||||
|
active: prod |
||||
|
include: common, util-prod |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_ht.api; |
package com.ccsens.ptos_tall.api; |
||||
|
|
||||
import com.ccsens.util.JsonResponse; |
import com.ccsens.util.JsonResponse; |
||||
import io.swagger.annotations.Api; |
import io.swagger.annotations.Api; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_ht.api; |
package com.ccsens.ptos_tall.api; |
||||
|
|
||||
import io.swagger.annotations.Api; |
import io.swagger.annotations.Api; |
||||
import lombok.extern.slf4j.Slf4j; |
import lombok.extern.slf4j.Slf4j; |
@ -1,4 +1,4 @@ |
|||||
package com.ccsens.dh_ht.bean.dto; |
package com.ccsens.ptos_tall.bean.dto; |
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
import io.swagger.annotations.ApiModelProperty; |
@ -0,0 +1,183 @@ |
|||||
|
package com.ccsens.ptos_tall.bean.po; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class SysBusiness implements Serializable { |
||||
|
private Long id; |
||||
|
|
||||
|
private String name; |
||||
|
|
||||
|
private String code; |
||||
|
|
||||
|
private String description; |
||||
|
|
||||
|
private String url; |
||||
|
|
||||
|
private String appId; |
||||
|
|
||||
|
private String secret; |
||||
|
|
||||
|
private Long creatorId; |
||||
|
|
||||
|
private Long lastAskTime; |
||||
|
|
||||
|
private Long lastAnswerTime; |
||||
|
|
||||
|
private Byte type; |
||||
|
|
||||
|
private Long operator; |
||||
|
|
||||
|
private Date createdAt; |
||||
|
|
||||
|
private Date updatedAt; |
||||
|
|
||||
|
private Byte recStatus; |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public Long getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(Long id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name == null ? null : name.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code == null ? null : code.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getDescription() { |
||||
|
return description; |
||||
|
} |
||||
|
|
||||
|
public void setDescription(String description) { |
||||
|
this.description = description == null ? null : description.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getUrl() { |
||||
|
return url; |
||||
|
} |
||||
|
|
||||
|
public void setUrl(String url) { |
||||
|
this.url = url == null ? null : url.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getAppId() { |
||||
|
return appId; |
||||
|
} |
||||
|
|
||||
|
public void setAppId(String appId) { |
||||
|
this.appId = appId == null ? null : appId.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getSecret() { |
||||
|
return secret; |
||||
|
} |
||||
|
|
||||
|
public void setSecret(String secret) { |
||||
|
this.secret = secret == null ? null : secret.trim(); |
||||
|
} |
||||
|
|
||||
|
public Long getCreatorId() { |
||||
|
return creatorId; |
||||
|
} |
||||
|
|
||||
|
public void setCreatorId(Long creatorId) { |
||||
|
this.creatorId = creatorId; |
||||
|
} |
||||
|
|
||||
|
public Long getLastAskTime() { |
||||
|
return lastAskTime; |
||||
|
} |
||||
|
|
||||
|
public void setLastAskTime(Long lastAskTime) { |
||||
|
this.lastAskTime = lastAskTime; |
||||
|
} |
||||
|
|
||||
|
public Long getLastAnswerTime() { |
||||
|
return lastAnswerTime; |
||||
|
} |
||||
|
|
||||
|
public void setLastAnswerTime(Long lastAnswerTime) { |
||||
|
this.lastAnswerTime = lastAnswerTime; |
||||
|
} |
||||
|
|
||||
|
public Byte getType() { |
||||
|
return type; |
||||
|
} |
||||
|
|
||||
|
public void setType(Byte type) { |
||||
|
this.type = type; |
||||
|
} |
||||
|
|
||||
|
public Long getOperator() { |
||||
|
return operator; |
||||
|
} |
||||
|
|
||||
|
public void setOperator(Long operator) { |
||||
|
this.operator = operator; |
||||
|
} |
||||
|
|
||||
|
public Date getCreatedAt() { |
||||
|
return createdAt; |
||||
|
} |
||||
|
|
||||
|
public void setCreatedAt(Date createdAt) { |
||||
|
this.createdAt = createdAt; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdatedAt() { |
||||
|
return updatedAt; |
||||
|
} |
||||
|
|
||||
|
public void setUpdatedAt(Date updatedAt) { |
||||
|
this.updatedAt = updatedAt; |
||||
|
} |
||||
|
|
||||
|
public Byte getRecStatus() { |
||||
|
return recStatus; |
||||
|
} |
||||
|
|
||||
|
public void setRecStatus(Byte recStatus) { |
||||
|
this.recStatus = recStatus; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
StringBuilder sb = new StringBuilder(); |
||||
|
sb.append(getClass().getSimpleName()); |
||||
|
sb.append(" ["); |
||||
|
sb.append("Hash = ").append(hashCode()); |
||||
|
sb.append(", id=").append(id); |
||||
|
sb.append(", name=").append(name); |
||||
|
sb.append(", code=").append(code); |
||||
|
sb.append(", description=").append(description); |
||||
|
sb.append(", url=").append(url); |
||||
|
sb.append(", appId=").append(appId); |
||||
|
sb.append(", secret=").append(secret); |
||||
|
sb.append(", creatorId=").append(creatorId); |
||||
|
sb.append(", lastAskTime=").append(lastAskTime); |
||||
|
sb.append(", lastAnswerTime=").append(lastAnswerTime); |
||||
|
sb.append(", type=").append(type); |
||||
|
sb.append(", operator=").append(operator); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", recStatus=").append(recStatus); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -1,6 +1,6 @@ |
|||||
package com.ccsens.dh_ptos.config; |
package com.ccsens.ptos_tall.config; |
||||
|
|
||||
import com.ccsens.dh_ptos.intercept.MybatisInterceptor; |
import com.ccsens.ptos_tall.intercept.MybatisInterceptor; |
||||
import org.springframework.context.annotation.Bean; |
import org.springframework.context.annotation.Bean; |
||||
import org.springframework.context.annotation.Configuration; |
import org.springframework.context.annotation.Configuration; |
||||
|
|
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue