Commit 091776e9 authored by chenhao's avatar chenhao

Merge branch 'developer' into chenhao

parents ce7b5517 f9e89e3f
...@@ -11,21 +11,21 @@ ...@@ -11,21 +11,21 @@
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes> <attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes> <attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="output" path="target/classes"/> <classpathentry kind="output" path="target/classes"/>
......
...@@ -3,11 +3,7 @@ ...@@ -3,11 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>amos-boot-biz-common</artifactId> <artifactId>amos-boot-biz-common</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<parent> <parent>
<artifactId>amos-biz-boot</artifactId> <artifactId>amos-biz-boot</artifactId>
<groupId>com.amosframework.boot</groupId> <groupId>com.amosframework.boot</groupId>
...@@ -15,6 +11,73 @@ ...@@ -15,6 +11,73 @@
</parent> </parent>
<dependencies> <dependencies>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-feign-systemctl</artifactId>
<version>${amos.version}</version>
</dependency>
<dependency>
<groupId>org.typroject</groupId>
<artifactId>tyboot-core-rdbms</artifactId>
<version>${tyboot-version}</version>
<exclusions>
<exclusion>
<groupId>org.typroject</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</exclusion>
<exclusion>
<artifactId>mysql-connector-java</artifactId>
<groupId>mysql</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<artifactId>mysql-connector-java</artifactId>
<groupId>mysql</groupId>
</dependency>
<dependency>
<groupId>org.typroject</groupId>
<artifactId>tyboot-core-restful</artifactId>
<version>${tyboot-version}</version>
<exclusions>
<exclusion>
<groupId>org.typroject</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</exclusion>
<exclusion>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.typroject</groupId>
<artifactId>tyboot-core-auth</artifactId>
<version>${tyboot-version}</version>
<exclusions>
<exclusion>
<groupId>org.typroject</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId> <artifactId>mybatis-plus-generator</artifactId>
...@@ -27,18 +90,7 @@ ...@@ -27,18 +90,7 @@
<groupId>org.mybatis.spring.boot</groupId> <groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId> <artifactId>mybatis-spring-boot-starter</artifactId>
</dependency> </dependency>
<!-- knife4j -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-spring-boot-starter</artifactId>
<version>${knife4j-spring-boot-starter.version}</version>
<exclusions>
<exclusion>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency> <dependency>
<groupId>org.javassist</groupId> <groupId>org.javassist</groupId>
<artifactId>javassist</artifactId> <artifactId>javassist</artifactId>
......
...@@ -3,33 +3,18 @@ ...@@ -3,33 +3,18 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>amos-boot-core</artifactId>
<packaging>jar</packaging>
<parent> <parent>
<artifactId>amos-biz-boot</artifactId> <artifactId>amos-biz-boot</artifactId>
<groupId>com.amosframework.boot</groupId> <groupId>com.amosframework.boot</groupId>
<version>1.0.0</version> <version>1.0.0</version>
</parent> </parent>
<artifactId>amos-boot-system-jpush</artifactId>
<version>8.0.0</version>
<dependencies> <dependencies>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-jpush-biz</artifactId>
<version>${amos-biz-boot.version}</version>
<exclusions>
<exclusion>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>
package com.yeejoin.amos.boot.biz.config; package com.yeejoin.amos.boot.core.config;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -7,8 +7,6 @@ import org.springframework.context.annotation.Bean; ...@@ -7,8 +7,6 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.constants.CommonConstant;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder; import springfox.documentation.builders.ParameterBuilder;
...@@ -23,10 +21,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc; ...@@ -23,10 +21,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
/** /**
* @Author lichenglong * @Author lichenglong
*/ */
//@Configuration
//@EnableSwagger2
//@EnableKnife4j
//@Import(BeanValidatorPluginsConfiguration.class)
@Configuration @Configuration
@EnableSwagger2WebMvc @EnableSwagger2WebMvc
public class Swagger2Config { public class Swagger2Config {
...@@ -67,16 +61,6 @@ public class Swagger2Config { ...@@ -67,16 +61,6 @@ public class Swagger2Config {
.globalOperationParameters(setHeaderToken()); .globalOperationParameters(setHeaderToken());
} }
/***
* oauth2配置
* 需要增加swagger授权回调地址
* http://localhost:8888/webjars/springfox-swagger-ui/o2c.html
* @return
*/
// @Bean
// SecurityScheme securityScheme() {
// return new ApiKey(CommonConstant.X_ACCESS_TOKEN, CommonConstant.X_ACCESS_TOKEN, "header");
// }
/** /**
* JWT token * JWT token
* @return * @return
...@@ -116,25 +100,5 @@ public class Swagger2Config { ...@@ -116,25 +100,5 @@ public class Swagger2Config {
.build(); .build();
} }
/**
* 新增 securityContexts 保持登录状态
*/
// private List<SecurityContext> securityContexts() {
// return new ArrayList(
// Collections.singleton(SecurityContext.builder()
// .securityReferences(defaultAuth())
// .forPaths(PathSelectors.regex("^(?!auth).*$"))
// .build())
// );
// }
//
// private List<SecurityReference> defaultAuth() {
// AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
// AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
// authorizationScopes[0] = authorizationScope;
// return new ArrayList(
// Collections.singleton(new SecurityReference(CommonConstant.X_ACCESS_TOKEN, authorizationScopes)));
// }
} }
package org.typroject.tyboot.core.restful.doc;
/**
* 此类是为了覆盖原有类,为空,不用写具体实现
* @author lichenglong
*
*/
public class Swagger2 {
}
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
select distinct (case select distinct (case
when ISNULL(belong_fighting_system_id) = 0 and LENGTH(trim(belong_fighting_system_id)) > 0 when ISNULL(belong_fighting_system_id) = 0 and LENGTH(trim(belong_fighting_system_id)) > 0
then belong_fighting_system_id then belong_fighting_system_id
else 0 end) belong_fighting_system_id, else -2 end) belong_fighting_system_id,
(case (case
when ISNULL(belong_fighting_system) = 0 and LENGTH(trim(belong_fighting_system)) > 0 when ISNULL(belong_fighting_system) = 0 and LENGTH(trim(belong_fighting_system)) > 0
then belong_fighting_system then belong_fighting_system
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
<if test="belongFightingSystemId > -1"> <if test="belongFightingSystemId > -1">
and belong_fighting_system_id = #{belongFightingSystemId} and belong_fighting_system_id = #{belongFightingSystemId}
</if> </if>
<if test="belongFightingSystemId == -1"> <if test="belongFightingSystemId == -2">
and belong_fighting_system_id is null and belong_fighting_system_id is null
</if> </if>
</if> </if>
......
...@@ -43,6 +43,11 @@ ...@@ -43,6 +43,11 @@
<artifactId>jsoup</artifactId> <artifactId>jsoup</artifactId>
<version>1.11.2</version> <version>1.11.2</version>
</dependency> </dependency>
<dependency>
<groupId>cn.jpush.api</groupId>
<artifactId>jpush-client</artifactId>
<version>3.3.10</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>amos-boot-module-api</artifactId>
<groupId>com.amosframework.boot</groupId>
<version>1.0.0</version>
</parent>
<artifactId>amos-boot-module-jpush-api</artifactId>
<dependencies>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-biz-common</artifactId>
<version>${amos-biz-boot.version}</version>
<exclusions>
<exclusion>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
</exclusion>
<exclusion>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</exclusion>
<exclusion>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project>
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
<module>amos-boot-module-fas-api</module> <module>amos-boot-module-fas-api</module>
<module>amos-boot-module-maintenance-api</module> <module>amos-boot-module-maintenance-api</module>
<module>amos-boot-module-supervision-api</module> <module>amos-boot-module-supervision-api</module>
<module>amos-boot-module-jpush-api</module>
<module>amos-boot-module-knowledgebase-api</module> <module>amos-boot-module-knowledgebase-api</module>
</modules> </modules>
</project> </project>
\ No newline at end of file
...@@ -24,11 +24,22 @@ ...@@ -24,11 +24,22 @@
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.typroject</groupId> <groupId>org.typroject</groupId>
<artifactId>tyboot-core-auth</artifactId> <artifactId>*</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.typroject</groupId>
<artifactId>tyboot-component-emq</artifactId>
<version>${tyboot-version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId> <artifactId>poi-scratchpad</artifactId>
<version>3.15</version> <version>3.15</version>
......
...@@ -95,7 +95,10 @@ ...@@ -95,7 +95,10 @@
<dependency> <dependency>
<groupId>org.liquibase</groupId> <groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId> <artifactId>liquibase-core</artifactId>
<version>3.8.9</version> </dependency>
<dependency>
<groupId>cn.jpush.api</groupId>
<artifactId>jpush-client</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
......
...@@ -95,6 +95,10 @@ ...@@ -95,6 +95,10 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId> <artifactId>spring-boot-starter-mail</artifactId>
</dependency> </dependency>
<dependency>
<groupId>cn.jpush.api</groupId>
<artifactId>jpush-client</artifactId>
</dependency>
</dependencies> </dependencies>
</project> </project>
<?xml version="1.0" encoding="UTF-8"?> <?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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0"
<modelVersion>4.0.0</modelVersion> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<parent> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<artifactId>amos-boot-module-biz</artifactId> <modelVersion>4.0.0</modelVersion>
<groupId>com.amosframework.boot</groupId> <parent>
<version>1.0.0</version> <artifactId>amos-boot-module-biz</artifactId>
</parent> <groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-supervision-biz</artifactId> <version>1.0.0</version>
</parent>
<artifactId>amos-boot-module-supervision-biz</artifactId>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.amosframework.boot</groupId> <groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-supervision-api</artifactId> <artifactId>amos-boot-module-supervision-api</artifactId>
<version>${amos-biz-boot.version}</version> <version>${amos-biz-boot.version}</version>
...@@ -92,6 +94,10 @@ ...@@ -92,6 +94,10 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId> <artifactId>spring-boot-starter-mail</artifactId>
</dependency> </dependency>
</dependencies> <dependency>
<groupId>cn.jpush.api</groupId>
<artifactId>jpush-client</artifactId>
</dependency>
</dependencies>
</project> </project>
...@@ -51,6 +51,5 @@ ...@@ -51,6 +51,5 @@
<module>amos-boot-module-fas-biz</module> <module>amos-boot-module-fas-biz</module>
<module>amos-boot-module-maintenance-biz</module> <module>amos-boot-module-maintenance-biz</module>
<module>amos-boot-module-supervision-biz</module> <module>amos-boot-module-supervision-biz</module>
<module>amos-boot-module-jpush-biz</module>
</modules> </modules>
</project> </project>
\ No newline at end of file
...@@ -29,7 +29,7 @@ emqx.password=a123456 ...@@ -29,7 +29,7 @@ emqx.password=a123456
rule.definition.load=false rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=jcs rule.definition.default-agency=jcs
rule.definition.localIp=172.16.3.39 rule.definition.localIp=172.16.10.66
## mongodb properties: ## mongodb properties:
spring.data.mongodb.uri=mongodb://172.16.10.66:27017/command_db spring.data.mongodb.uri=mongodb://172.16.10.66:27017/command_db
......
<?xml version="1.0" encoding="UTF-8"?> <?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" <project xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<modelVersion>4.0.0</modelVersion> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent> <modelVersion>4.0.0</modelVersion>
<artifactId>amos-biz-boot</artifactId> <parent>
<groupId>com.amosframework.boot</groupId> <artifactId>amos-biz-boot</artifactId>
<version>1.0.0</version> <groupId>com.amosframework.boot</groupId>
</parent> <version>1.0.0</version>
<artifactId>amos-boot-system-supervision</artifactId> </parent>
<dependencies> <artifactId>amos-boot-system-supervision</artifactId>
<dependency> <dependencies>
<groupId>com.amosframework.boot</groupId> <dependency>
<artifactId>amos-boot-module-supervision-biz</artifactId> <groupId>com.amosframework.boot</groupId>
<version>${amos-biz-boot.version}</version> <artifactId>amos-boot-module-supervision-biz</artifactId>
</dependency> <version>${amos-biz-boot.version}</version>
</dependencies> </dependency>
<build> <dependency>
<plugins> <groupId>cn.jpush.api</groupId>
<plugin> <artifactId>jpush-client</artifactId>
<groupId>org.springframework.boot</groupId> </dependency>
<artifactId>spring-boot-maven-plugin</artifactId> </dependencies>
</plugin> <build>
</plugins> <plugins>
</build> <plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>
...@@ -37,11 +37,6 @@ emqx.broker=tcp://172.16.10.85:1883 ...@@ -37,11 +37,6 @@ emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
## redisʱʱ
redis.cache.failure.time=10800
failure.work.flow.processDefinitionKey=malfunction_repair
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4 tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.46.151.113:8000 tzs.cti.url=http://36.46.151.113:8000
\ No newline at end of file
...@@ -8,6 +8,8 @@ spring.jackson.date-format=yyyy-MM-dd HH:mm:ss ...@@ -8,6 +8,8 @@ spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
logging.config=classpath:logback-${spring.profiles.active}.xml logging.config=classpath:logback-${spring.profiles.active}.xml
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
## DB properties:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.type=com.zaxxer.hikari.HikariDataSource spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle=10 spring.datasource.hikari.minimum-idle=10
spring.datasource.hikari.maximum-pool-size=25 spring.datasource.hikari.maximum-pool-size=25
...@@ -17,6 +19,24 @@ spring.datasource.hikari.pool-name=DatebookHikariCP ...@@ -17,6 +19,24 @@ spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.max-lifetime=120000 spring.datasource.hikari.max-lifetime=120000
spring.datasource.hikari.connection-timeout=30000 spring.datasource.hikari.connection-timeout=30000
spring.datasource.hikari.connection-test-query=SELECT 1 spring.datasource.hikari.connection-test-query=SELECT 1
## eureka properties:
eureka.client.registry-fetch-interval-seconds=5
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url-path=/actuator/health
eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.lease-renewal-interval-in-seconds=5
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url-path=/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/doc.html
## redis properties:
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
iot.fegin.name=AMOS-API-IOT iot.fegin.name=AMOS-API-IOT
...@@ -24,4 +44,12 @@ equip.fegin.name=AMOS-EQUIPMANAGE ...@@ -24,4 +44,12 @@ equip.fegin.name=AMOS-EQUIPMANAGE
supervision.feign.name = AMOS-SUPERVISION-API supervision.feign.name = AMOS-SUPERVISION-API
security.systemctl.name=AMOS-API-SYSTEMCTL security.systemctl.name=AMOS-API-SYSTEMCTL
\ No newline at end of file
jcs.company.topic.add=jcs/company/topic/add
jcs.company.topic.delete=jcs/company/topic/delete
## 设备联动服务(车库门、广播、警铃)
control.fegin.name=JCS-API-CONTROL
## redis超时时间
redis.cache.failure.time=10800
failure.work.flow.processDefinitionKey=malfunction_repair
...@@ -4,34 +4,23 @@ ...@@ -4,34 +4,23 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<artifactId>amos-boot-module-biz</artifactId> <artifactId>amos-boot-utils</artifactId>
<groupId>com.amosframework.boot</groupId> <groupId>com.amosframework.boot</groupId>
<version>1.0.0</version> <version>1.0.0</version>
</parent> </parent>
<artifactId>amos-boot-module-jpush-biz</artifactId> <artifactId>amos-boot-utils-jpush</artifactId>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.amosframework.boot</groupId> <groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-jpush-api</artifactId> <artifactId>amos-boot-core</artifactId>
<version>${amos-biz-boot.version}</version> <version>${amos-biz-boot.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.amosframework.boot</groupId> <groupId>cn.jpush.api</groupId>
<artifactId>amos-boot-biz-common</artifactId> <artifactId>jpush-client</artifactId>
<version>${amos-biz-boot.version}</version>
<exclusions>
<exclusion>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
</exclusion>
<exclusion>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
</dependencies> </dependencies>
</project> </project>
...@@ -16,7 +16,7 @@ import org.springframework.context.ConfigurableApplicationContext; ...@@ -16,7 +16,7 @@ import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler; //import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
/** /**
* <pre> * <pre>
...@@ -40,7 +40,7 @@ public class JpushApplication { ...@@ -40,7 +40,7 @@ public class JpushApplication {
public static void main(String[] args) throws UnknownHostException { public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext context = SpringApplication.run(JpushApplication.class, args); ConfigurableApplicationContext context = SpringApplication.run(JpushApplication.class, args);
GlobalExceptionHandler.setAlwaysOk(true); // GlobalExceptionHandler.setAlwaysOk(true);
Environment env = context.getEnvironment(); Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress(); String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port"); String port = env.getProperty("server.port");
......
package com.yeejoin.amos.jpush.service.business.controller; package com.yeejoin.amos.jpush.service.business.controller;
import com.yeejoin.amos.jpush.common.entity.CommonResponse;
import com.yeejoin.amos.jpush.common.entity.CommonResponseUtil;
import com.yeejoin.amos.jpush.service.business.param.PushMsgParam;
import com.yeejoin.amos.jpush.service.jpush.AppMessagePushService;
import cn.jpush.api.push.model.PushPayload; import cn.jpush.api.push.model.PushPayload;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -17,8 +12,11 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -17,8 +12,11 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import com.yeejoin.amos.jpush.common.entity.CommonResponse;
import com.yeejoin.amos.jpush.common.entity.CommonResponseUtil;
import com.yeejoin.amos.jpush.service.business.param.PushMsgParam;
import com.yeejoin.amos.jpush.service.jpush.AppMessagePushService;
/** /**
...@@ -40,7 +38,7 @@ public class UserController { ...@@ -40,7 +38,7 @@ public class UserController {
//极光推送 //极光推送
@ApiOperation(value = "发送消息", notes = "发送消息") @ApiOperation(value = "发送消息", notes = "发送消息")
@RequestMapping(value = "/sendMessage", method = RequestMethod.POST) @RequestMapping(value = "/sendMessage", method = RequestMethod.POST)
public CommonResponse sendMessage(@RequestBody List<PushMsgParam> responses) { public CommonResponse sendMessage(@RequestBody List<PushMsgParam> responses) {
...@@ -53,7 +51,7 @@ public class UserController { ...@@ -53,7 +51,7 @@ public class UserController {
return CommonResponseUtil.failure("发送失败"); return CommonResponseUtil.failure("发送失败");
} }
} }
@ApiOperation(value = "发送消息", notes = "发送消息") @ApiOperation(value = "发送消息", notes = "发送消息")
@RequestMapping(value = "/sendMessageone", method = RequestMethod.POST) @RequestMapping(value = "/sendMessageone", method = RequestMethod.POST)
public CommonResponse sendMessageone(@RequestBody PushMsgParam responses) { public CommonResponse sendMessageone(@RequestBody PushMsgParam responses) {
...@@ -66,7 +64,6 @@ public class UserController { ...@@ -66,7 +64,6 @@ public class UserController {
return CommonResponseUtil.failure("发送失败"); return CommonResponseUtil.failure("发送失败");
} }
} }
@ApiOperation(value = "发送消息", notes = "发送消息") @ApiOperation(value = "发送消息", notes = "发送消息")
@RequestMapping(value = "/pushNoticeMany", method = RequestMethod.POST) @RequestMapping(value = "/pushNoticeMany", method = RequestMethod.POST)
public CommonResponse pushNoticeMany(@RequestBody PushMsgParam responses) { public CommonResponse pushNoticeMany(@RequestBody PushMsgParam responses) {
...@@ -79,7 +76,6 @@ public class UserController { ...@@ -79,7 +76,6 @@ public class UserController {
return CommonResponseUtil.failure("发送失败"); return CommonResponseUtil.failure("发送失败");
} }
} }
@ApiOperation(value = "发送消息", notes = "发送消息") @ApiOperation(value = "发送消息", notes = "发送消息")
@RequestMapping(value = "/buildPushPayload", method = RequestMethod.POST) @RequestMapping(value = "/buildPushPayload", method = RequestMethod.POST)
public CommonResponse buildPushPayload(@RequestBody PushMsgParam responses) { public CommonResponse buildPushPayload(@RequestBody PushMsgParam responses) {
...@@ -92,7 +88,7 @@ public class UserController { ...@@ -92,7 +88,7 @@ public class UserController {
return CommonResponseUtil.failure("发送失败"); return CommonResponseUtil.failure("发送失败");
} }
} }
@ApiOperation(value = "删除别名关联设备", notes = "删除别名关联设备") @ApiOperation(value = "删除别名关联设备", notes = "删除别名关联设备")
@RequestMapping(value = "/pushDevice", method = RequestMethod.GET) @RequestMapping(value = "/pushDevice", method = RequestMethod.GET)
public CommonResponse pushDevice(@RequestParam("alias") String alias) { public CommonResponse pushDevice(@RequestParam("alias") String alias) {
...@@ -108,7 +104,6 @@ public class UserController { ...@@ -108,7 +104,6 @@ public class UserController {
return CommonResponseUtil.failure(); return CommonResponseUtil.failure();
} }
} }
@ApiOperation(value = "别名关联设备", notes = "别名关联设备") @ApiOperation(value = "别名关联设备", notes = "别名关联设备")
@RequestMapping(value = "/PushDeviceRegistration", method = RequestMethod.GET) @RequestMapping(value = "/PushDeviceRegistration", method = RequestMethod.GET)
public CommonResponse PushDeviceRegistration(@RequestParam("registrationId") String registrationId,@RequestParam("alias") String alias) { public CommonResponse PushDeviceRegistration(@RequestParam("registrationId") String registrationId,@RequestParam("alias") String alias) {
......
...@@ -3,20 +3,16 @@ ...@@ -3,20 +3,16 @@
*/ */
package com.yeejoin.amos.jpush.service.constants; package com.yeejoin.amos.jpush.service.constants;
import java.text.SimpleDateFormat;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.text.SimpleDateFormat;
/** /**
* 常量 * 常量
*/ */
public class XJConstant { public class XJConstant {
private static final Logger logger = LoggerFactory.getLogger(XJConstant.class); private static final Logger logger = LoggerFactory.getLogger(XJConstant.class);
/**
* 构造方法
*/
private XJConstant() { private XJConstant() {
logger.debug(XJConstant.CONSTRUCTOR); logger.debug(XJConstant.CONSTRUCTOR);
} }
......
...@@ -1159,10 +1159,10 @@ public class DateUtil { ...@@ -1159,10 +1159,10 @@ public class DateUtil {
return true; return true;
} }
public static void main(String[] args) // public static void main(String[] args)
{ // {
// // //
} // }
/** /**
* 将date 按照指定 的 格式 formatStr 转换成 字符串 * 将date 按照指定 的 格式 formatStr 转换成 字符串
......
...@@ -8,5 +8,10 @@ eureka.instance.metadata-map.management.context-path=${server.servlet.context-pa ...@@ -8,5 +8,10 @@ eureka.instance.metadata-map.management.context-path=${server.servlet.context-pa
eureka.instance.status-page-url-path=/actuator/info eureka.instance.status-page-url-path=/actuator/info
eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html eureka.instance.metadata-map.management.api-docs=http://localhost:${server.port}${server.servlet.context-path}/swagger-ui.html
## redis properties:
spring.redis.database=0
spring.redis.host=172.16.10.85
spring.redis.port=6379
spring.redis.password=amos2019Redis
params.isPush=true params.isPush=true
\ No newline at end of file
server.port=7800
spring.application.name=AMOS-PUSH spring.application.name=AMOS-PUSH
server.servlet.context-path=/jpush
server.port=7800
spring.profiles.active=dev spring.profiles.active=dev
spring.jackson.time-zone=GMT+8 spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
ribbon.eureka.enabled=true
ribbon.ConnectTimeout=60000
ribbon.ReadTimeout=60000
ribbon.OkToRetryOnAllOperations=true
ribbon.MaxAutoRetriesNextServer=2
ribbon.MaxAutoRetries=1
spring.jackson.serialization.write-dates-as-timestamps=true spring.jackson.serialization.write-dates-as-timestamps=true
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>amos-biz-boot</artifactId>
<groupId>com.amosframework.boot</groupId>
<version>1.0.0</version>
</parent>
<artifactId>amos-boot-utils</artifactId>
<packaging>pom</packaging>
<dependencies>
</dependencies>
<modules>
<module>amos-boot-utils-jpush</module>
</modules>
</project>
...@@ -37,9 +37,12 @@ ...@@ -37,9 +37,12 @@
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId> <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.hystrix</groupId> <groupId>com.netflix.hystrix</groupId>
<artifactId>hystrix-javanica</artifactId> <artifactId>hystrix-javanica</artifactId>
<version>1.5.18</version>
<scope>compile</scope> <scope>compile</scope>
<exclusions> <exclusions>
<exclusion> <exclusion>
...@@ -61,7 +64,11 @@ ...@@ -61,7 +64,11 @@
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.67</version> <version>1.2.67</version>
</dependency> </dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-feign-privilege</artifactId>
<version>${amos.version}</version>
</dependency>
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
...@@ -162,16 +169,11 @@ ...@@ -162,16 +169,11 @@
<artifactId>spring-boot-starter-websocket</artifactId> <artifactId>spring-boot-starter-websocket</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.jpush.api</groupId>
<artifactId>jpush-client</artifactId>
<version>3.3.10</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-jexl</artifactId> <artifactId>commons-jexl</artifactId>
<version>2.1.1</version> <version>2.1.1</version>
</dependency> </dependency>
<!-- MQTT依赖 --> <!-- MQTT���� -->
<dependency> <dependency>
<groupId>org.springframework.integration</groupId> <groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-stream</artifactId> <artifactId>spring-integration-stream</artifactId>
...@@ -185,73 +187,22 @@ ...@@ -185,73 +187,22 @@
<artifactId>lombok</artifactId> <artifactId>lombok</artifactId>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- knife4j -->
<dependency> <dependency>
<groupId>org.typroject</groupId> <groupId>com.github.xiaoymin</groupId>
<artifactId>tyboot-core-restful</artifactId> <artifactId>knife4j-spring-boot-starter</artifactId>
<version>${tyboot-version}</version> <version>${knife4j-spring-boot-starter.version}</version>
<exclusions>
<exclusion>
<groupId>org.typroject</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</exclusion>
<exclusion>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-feign-privilege</artifactId>
<version>${amos.version}</version>
</dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-feign-systemctl</artifactId>
<version>${amos.version}</version>
</dependency>
<dependency>
<groupId>org.typroject</groupId>
<artifactId>tyboot-core-rdbms</artifactId>
<version>${tyboot-version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.typroject</groupId> <groupId>org.javassist</groupId>
<artifactId>*</artifactId> <artifactId>javassist</artifactId>
</exclusion>
<exclusion>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</exclusion>
<exclusion>
<artifactId>mysql-connector-java</artifactId>
<groupId>mysql</groupId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<artifactId>mysql-connector-java</artifactId> <groupId>io.swagger</groupId>
<groupId>mysql</groupId> <artifactId>swagger-annotations</artifactId>
<version>8.0.22</version> <version>1.5.13</version>
</dependency>
<dependency>
<groupId>org.typroject</groupId>
<artifactId>tyboot-core-auth</artifactId>
<version>${tyboot-version}</version>
<exclusions>
<exclusion>
<groupId>org.typroject</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>
...@@ -291,6 +242,16 @@ ...@@ -291,6 +242,16 @@
<artifactId>mybatis-spring-boot-starter</artifactId> <artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.0</version> <version>2.1.0</version>
</dependency> </dependency>
<dependency>
<groupId>cn.jpush.api</groupId>
<artifactId>jpush-client</artifactId>
<version>3.3.10</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>4.4.3</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<repositories> <repositories>
...@@ -308,16 +269,16 @@ ...@@ -308,16 +269,16 @@
<name>maven-public</name> <name>maven-public</name>
<url>http://172.16.1.6:8081/nexus/content/repositories/maven-public/</url> <url>http://172.16.1.6:8081/nexus/content/repositories/maven-public/</url>
</repository> </repository>
<!-- <repository>--> <!-- <repository> -->
<!-- <id>maven-public1</id>--> <!-- <id>maven-public1</id> -->
<!-- <name>maven-public</name>--> <!-- <name>maven-public</name> -->
<!-- <url>http://repo.typroject.org:8081/repository/maven-public/</url>--> <!-- <url>http://repo.typroject.org:8081/repository/maven-public/</url> -->
<!-- </repository>--> <!-- </repository> -->
<!-- <repository>--> <!-- <repository> -->
<!-- <id>maven-snapshot</id>--> <!-- <id>maven-snapshot</id> -->
<!-- <name>maven-snapshot</name>--> <!-- <name>maven-snapshot</name> -->
<!-- <url>http://repo.typroject.org:8081/repository/maven-snapshots/</url>--> <!-- <url>http://repo.typroject.org:8081/repository/maven-snapshots/</url> -->
<!-- </repository>--> <!-- </repository> -->
</repositories> </repositories>
<modules> <modules>
...@@ -330,6 +291,7 @@ ...@@ -330,6 +291,7 @@
<module>amos-boot-system-patrol</module> <module>amos-boot-system-patrol</module>
<module>amos-boot-system-maintenance</module> <module>amos-boot-system-maintenance</module>
<module>amos-boot-system-supervision</module> <module>amos-boot-system-supervision</module>
<module>amos-boot-system-jpush</module> <module>amos-boot-core</module>
<module>amos-boot-utils</module>
</modules> </modules>
</project> </project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment