Просмотр исходного кода

Merge branch 'master' of https://git.flowbb.top/humuyu/appsp

songxiaodong 1 год назад
Родитель
Сommit
d6129abe50

+ 354 - 344
java/pom.xml

@@ -1,347 +1,357 @@
 <?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>
-    <groupId>com.anji-plus.sp</groupId>
-    <artifactId>sp-parent</artifactId>
-    <version>1.0.0</version>
-    <name>sp-parent</name>
-    <packaging>pom</packaging>
-    <description>移动服务平台</description>
-
-    <modules>
-        <module>sp-common</module>
-        <module>sp-auth</module>
-        <module>sp-notice</module>
-        <module>sp-version</module>
-        <module>sp-app</module>
-        <module>sp-push</module>
-    </modules>
-
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
-        <app.sp.version>1.0.0</app.sp.version>
-        <java.version>1.8</java.version>
-        <spring.boot.version>2.2.5.RELEASE</spring.boot.version>
-        <pagehelper.spring.boot.starter.version>1.2.13</pagehelper.spring.boot.starter.version>
-        <fastjson.version>1.2.70</fastjson.version>
-        <druid.version>1.1.14</druid.version>
-        <commons.io.version>2.5</commons.io.version>
-        <commons.fileupload.version>1.3.3</commons.fileupload.version>
-        <bitwalker.version>1.19</bitwalker.version>
-        <jwt.version>0.9.0</jwt.version>
-        <swagger.version>2.9.2</swagger.version>
-        <poi.version>3.17</poi.version>
-        <oshi.version>3.9.1</oshi.version>
-        <velocity.version>1.7</velocity.version>
-        <apk.parser.version>2.6.10</apk.parser.version>
-        <redisson.version>3.6.5</redisson.version>
-        <mybatis.plus.boot.starter.version>3.3.2</mybatis.plus.boot.starter.version>
-    </properties>
-
-    <dependencyManagement>
-        <dependencies>
-            <!-- SpringBoot的依赖配置-->
-            <dependency>
-                <groupId>org.springframework.boot</groupId>
-                <artifactId>spring-boot-dependencies</artifactId>
-                <version>${spring.boot.version}</version>
-                <type>pom</type>
-                <scope>import</scope>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
-    <dependencies>
-        <!-- SpringBoot 核心包 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter</artifactId>
-        </dependency>
-
-
-        <!-- apk解析包 -->
-        <dependency>
-            <groupId>net.dongliu</groupId>
-            <artifactId>apk-parser</artifactId>
-            <version>${apk.parser.version}</version>
-        </dependency>
-
-        <!-- 解析客户端操作系统、浏览器等 -->
-        <dependency>
-            <groupId>eu.bitwalker</groupId>
-            <artifactId>UserAgentUtils</artifactId>
-            <version>${bitwalker.version}</version>
-        </dependency>
-
-        <!-- SpringBoot 测试 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-test</artifactId>
-            <scope>test</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.junit.vintage</groupId>
-                    <artifactId>junit-vintage-engine</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <!-- 极光推送开始-->
-        <dependency>
-            <groupId>cn.jpush.api</groupId>
-            <artifactId>jpush-client</artifactId>
-            <version>3.4.7</version>
-        </dependency>
-        <!-- 极光推送结束-->
-        <dependency>
-            <groupId>org.conscrypt</groupId>
-            <artifactId>conscrypt-openjdk-uber</artifactId>
-            <version>2.1.0</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-            <version>4.5.12</version>
-        </dependency>
-
-        <!-- apache common封装好的HttpClient-->
-        <dependency>
-            <groupId>commons-httpclient</groupId>
-            <artifactId>commons-httpclient</artifactId>
-            <version>3.1</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpmime</artifactId>
-            <version>4.5.12</version>
-        </dependency>
-
-        <dependency>
-            <groupId>com.googlecode.json-simple</groupId>
-            <artifactId>json-simple</artifactId>
-            <version>1.1.1</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpcore</artifactId>
-            <version>4.4.13</version>
-        </dependency>
-
-
-
-        <!-- SpringBoot 拦截器 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-aop</artifactId>
-        </dependency>
-
-        <!-- SpringBoot Web容器 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-web</artifactId>
-        </dependency>
-
-        <!-- spring security 安全认证 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-security</artifactId>
-        </dependency>
-
-        <!-- redis 缓存操作 -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-data-redis</artifactId>
-        </dependency>
-
-        <!-- redisson 分布式锁-->
-        <dependency>
-            <groupId>org.redisson</groupId>
-            <artifactId>redisson</artifactId>
-            <version>${redisson.version}</version>
-        </dependency>
-
-        <!-- pool 对象池 -->
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-pool2</artifactId>
-        </dependency>
-
-        <!--常用工具类 -->
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-lang3</artifactId>
-        </dependency>
-
-        <!-- Mysql驱动包 -->
-        <dependency>
-            <groupId>mysql</groupId>
-            <artifactId>mysql-connector-java</artifactId>
-            <scope>runtime</scope>
-        </dependency>
-
-        <!-- SpringBoot集成mybatis框架 -->
-        <dependency>
-            <groupId>com.baomidou</groupId>
-            <artifactId>mybatis-plus-boot-starter</artifactId>
-            <version>${mybatis.plus.boot.starter.version}</version>
-        </dependency>
-
-        <!-- pagehelper 分页插件 -->
-        <dependency>
-            <groupId>com.github.pagehelper</groupId>
-            <artifactId>pagehelper-spring-boot-starter</artifactId>
-            <version>${pagehelper.spring.boot.starter.version}</version>
-        </dependency>
-
-        <!--阿里数据库连接池 -->
-<!--        <dependency>-->
-<!--            <groupId>com.alibaba</groupId>-->
-<!--            <artifactId>druid-spring-boot-starter</artifactId>-->
-<!--            <version>${druid.version}</version>-->
-<!--        </dependency>-->
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>druid</artifactId>
-            <version>1.1.22</version>
-        </dependency>
-
-        <!--io常用工具类 -->
-        <dependency>
-            <groupId>commons-io</groupId>
-            <artifactId>commons-io</artifactId>
-            <version>${commons.io.version}</version>
-        </dependency>
-
-        <!--文件上传工具类 -->
-        <dependency>
-            <groupId>commons-fileupload</groupId>
-            <artifactId>commons-fileupload</artifactId>
-            <version>${commons.fileupload.version}</version>
-        </dependency>
-
-        <!-- 阿里JSON解析器 -->
-        <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>fastjson</artifactId>
-            <version>${fastjson.version}</version>
-        </dependency>
-
-        <!--Spring框架基本的核心工具-->
-        <dependency>
-            <groupId>org.springframework</groupId>
-            <artifactId>spring-context-support</artifactId>
-        </dependency>
-
-
-        <!--Token生成与解析-->
-        <dependency>
-            <groupId>io.jsonwebtoken</groupId>
-            <artifactId>jjwt</artifactId>
-            <version>${jwt.version}</version>
-        </dependency>
-
-
-        <!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本-->
-        <dependency>
-            <groupId>io.swagger</groupId>
-            <artifactId>swagger-annotations</artifactId>
-            <version>1.5.21</version>
-        </dependency>
-
-        <dependency>
-            <groupId>io.swagger</groupId>
-            <artifactId>swagger-models</artifactId>
-            <version>1.5.21</version>
-        </dependency>
-
-        <!-- swagger2-->
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger2</artifactId>
-            <version>${swagger.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>io.swagger</groupId>
-                    <artifactId>swagger-annotations</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>io.swagger</groupId>
-                    <artifactId>swagger-models</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-
-        <!-- swagger2-UI-->
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger-ui</artifactId>
-            <version>${swagger.version}</version>
-        </dependency>
-
-        <!--通过ip查询地址-->
-        <dependency>
-            <groupId>org.lionsoul</groupId>
-            <artifactId>ip2region</artifactId>
-            <version>1.7</version>
-        </dependency>
-
-        <!-- lombok -->
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-            <version>1.18.12</version>
-            <scope>provided</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>com.anji-plus</groupId>
-            <artifactId>spring-boot-starter-captcha</artifactId>
-            <version>1.2.9</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-amqp</artifactId>
-        </dependency>
-    </dependencies>
-
-    <profiles>
-        <profile>
-            <id>dev</id>
-            <properties>
-                <spring.profiles.active>dev</spring.profiles.active>
-            </properties>
-            <activation>
-                <activeByDefault>true</activeByDefault>
-            </activation>
-        </profile>
-    </profiles>
-
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.3</version>
-                <configuration>
-                    <source>1.8</source>
-                    <target>1.8</target>
-                    <encoding>${project.build.sourceEncoding}</encoding>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-resources-plugin</artifactId>
-                <version>2.4</version>
-                <configuration>
-                    <encoding>${project.build.sourceEncoding}</encoding>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
+<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>
+	<groupId>com.anji-plus.sp</groupId>
+	<artifactId>sp-parent</artifactId>
+	<version>1.0.0</version>
+	<name>sp-parent</name>
+	<packaging>pom</packaging>
+	<description>移动服务平台</description>
+
+	<modules>
+		<module>sp-common</module>
+		<module>sp-auth</module>
+		<module>sp-notice</module>
+		<module>sp-version</module>
+		<module>sp-app</module>
+		<module>sp-push</module>
+	</modules>
+
+	<properties>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+		<app.sp.version>1.0.0</app.sp.version>
+		<java.version>1.8</java.version>
+		<spring.boot.version>2.2.5.RELEASE</spring.boot.version>
+		<pagehelper.spring.boot.starter.version>1.2.13</pagehelper.spring.boot.starter.version>
+		<fastjson.version>1.2.70</fastjson.version>
+		<druid.version>1.1.14</druid.version>
+		<commons.io.version>2.5</commons.io.version>
+		<commons.fileupload.version>1.3.3</commons.fileupload.version>
+		<bitwalker.version>1.19</bitwalker.version>
+		<jwt.version>0.9.0</jwt.version>
+		<swagger.version>2.9.2</swagger.version>
+		<poi.version>3.17</poi.version>
+		<oshi.version>3.9.1</oshi.version>
+		<velocity.version>1.7</velocity.version>
+		<apk.parser.version>2.6.10</apk.parser.version>
+		<redisson.version>3.6.5</redisson.version>
+		<mybatis.plus.boot.starter.version>3.3.2</mybatis.plus.boot.starter.version>
+	</properties>
+
+	<dependencyManagement>
+		<dependencies>
+			<!-- SpringBoot的依赖配置 -->
+			<dependency>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-dependencies</artifactId>
+				<version>${spring.boot.version}</version>
+				<type>pom</type>
+				<scope>import</scope>
+			</dependency>
+		</dependencies>
+	</dependencyManagement>
+
+	<dependencies>
+		<!-- SpringBoot 核心包 -->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter</artifactId>
+		</dependency>
+
+
+		<!-- apk解析包 -->
+		<dependency>
+			<groupId>net.dongliu</groupId>
+			<artifactId>apk-parser</artifactId>
+			<version>${apk.parser.version}</version>
+		</dependency>
+
+		<!-- 解析客户端操作系统、浏览器等 -->
+		<dependency>
+			<groupId>eu.bitwalker</groupId>
+			<artifactId>UserAgentUtils</artifactId>
+			<version>${bitwalker.version}</version>
+		</dependency>
+
+		<!-- SpringBoot 测试 -->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-test</artifactId>
+			<scope>test</scope>
+			<exclusions>
+				<exclusion>
+					<groupId>org.junit.vintage</groupId>
+					<artifactId>junit-vintage-engine</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+		<!-- 极光推送开始 -->
+		<dependency>
+			<groupId>cn.jpush.api</groupId>
+			<artifactId>jpush-client</artifactId>
+			<version>3.4.7</version>
+		</dependency>
+		<!-- 极光推送结束 -->
+		<dependency>
+			<groupId>org.conscrypt</groupId>
+			<artifactId>conscrypt-openjdk-uber</artifactId>
+			<version>2.1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpclient</artifactId>
+			<version>4.5.12</version>
+		</dependency>
+
+		<!-- apache common封装好的HttpClient -->
+		<dependency>
+			<groupId>commons-httpclient</groupId>
+			<artifactId>commons-httpclient</artifactId>
+			<version>3.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpmime</artifactId>
+			<version>4.5.12</version>
+		</dependency>
+
+		<dependency>
+			<groupId>com.googlecode.json-simple</groupId>
+			<artifactId>json-simple</artifactId>
+			<version>1.1.1</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpcore</artifactId>
+			<version>4.4.13</version>
+		</dependency>
+
+
+
+		<!-- SpringBoot 拦截器 -->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-aop</artifactId>
+		</dependency>
+
+		<!-- SpringBoot Web容器 -->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-web</artifactId>
+		</dependency>
+
+		<!-- spring security 安全认证 -->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-security</artifactId>
+		</dependency>
+
+		<!-- redis 缓存操作 -->
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-data-redis</artifactId>
+		</dependency>
+
+		<!-- redisson 分布式锁 -->
+		<dependency>
+			<groupId>org.redisson</groupId>
+			<artifactId>redisson</artifactId>
+			<version>${redisson.version}</version>
+		</dependency>
+
+		<!-- pool 对象池 -->
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-pool2</artifactId>
+		</dependency>
+
+		<!--常用工具类 -->
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+		</dependency>
+
+		<!-- Mysql驱动包 -->
+		<dependency>
+			<groupId>mysql</groupId>
+			<artifactId>mysql-connector-java</artifactId>
+			<scope>runtime</scope>
+		</dependency>
+
+		<!-- SpringBoot集成mybatis框架 -->
+		<dependency>
+			<groupId>com.baomidou</groupId>
+			<artifactId>mybatis-plus-boot-starter</artifactId>
+			<version>${mybatis.plus.boot.starter.version}</version>
+		</dependency>
+
+		<!-- pagehelper 分页插件 -->
+		<dependency>
+			<groupId>com.github.pagehelper</groupId>
+			<artifactId>pagehelper-spring-boot-starter</artifactId>
+			<version>${pagehelper.spring.boot.starter.version}</version>
+		</dependency>
+
+		<!--阿里数据库连接池 -->
+		<!-- <dependency> -->
+		<!-- <groupId>com.alibaba</groupId> -->
+		<!-- <artifactId>druid-spring-boot-starter</artifactId> -->
+		<!-- <version>${druid.version}</version> -->
+		<!-- </dependency> -->
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>druid</artifactId>
+			<version>1.1.22</version>
+		</dependency>
+
+		<!--io常用工具类 -->
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>${commons.io.version}</version>
+		</dependency>
+
+		<!--文件上传工具类 -->
+		<dependency>
+			<groupId>commons-fileupload</groupId>
+			<artifactId>commons-fileupload</artifactId>
+			<version>${commons.fileupload.version}</version>
+		</dependency>
+
+		<!-- 阿里JSON解析器 -->
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>${fastjson.version}</version>
+		</dependency>
+
+		<!--Spring框架基本的核心工具 -->
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context-support</artifactId>
+		</dependency>
+
+
+		<!--Token生成与解析 -->
+		<dependency>
+			<groupId>io.jsonwebtoken</groupId>
+			<artifactId>jjwt</artifactId>
+			<version>${jwt.version}</version>
+		</dependency>
+
+
+		<!--防止进入swagger页面报类型转换错误,排除2.9.2中的引用,手动增加1.5.21版本 -->
+		<dependency>
+			<groupId>io.swagger</groupId>
+			<artifactId>swagger-annotations</artifactId>
+			<version>1.5.21</version>
+		</dependency>
+
+		<dependency>
+			<groupId>io.swagger</groupId>
+			<artifactId>swagger-models</artifactId>
+			<version>1.5.21</version>
+		</dependency>
+
+		<!-- swagger2 -->
+		<dependency>
+			<groupId>io.springfox</groupId>
+			<artifactId>springfox-swagger2</artifactId>
+			<version>${swagger.version}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>io.swagger</groupId>
+					<artifactId>swagger-annotations</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>io.swagger</groupId>
+					<artifactId>swagger-models</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+
+		<!-- swagger2-UI -->
+		<dependency>
+			<groupId>io.springfox</groupId>
+			<artifactId>springfox-swagger-ui</artifactId>
+			<version>${swagger.version}</version>
+		</dependency>
+
+		<!--通过ip查询地址 -->
+		<dependency>
+			<groupId>org.lionsoul</groupId>
+			<artifactId>ip2region</artifactId>
+			<version>1.7</version>
+		</dependency>
+
+		<!-- lombok -->
+		<dependency>
+			<groupId>org.projectlombok</groupId>
+			<artifactId>lombok</artifactId>
+			<version>1.18.12</version>
+			<scope>provided</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>com.anji-plus</groupId>
+			<artifactId>spring-boot-starter-captcha</artifactId>
+			<version>1.2.9</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-amqp</artifactId>
+		</dependency>
+	</dependencies>
+
+	<profiles>
+		<profile>
+			<id>dev</id>
+			<properties>
+				<spring.profiles.active>dev</spring.profiles.active>
+			</properties>
+			<activation>
+				<activeByDefault>true</activeByDefault>
+			</activation>
+		</profile>
+	</profiles>
+
+
+	<build>
+		<pluginManagement>
+			<plugins>
+				<plugin>
+					<groupId>org.springframework.boot</groupId>
+					<artifactId>spring-boot-maven-plugin</artifactId>
+					<version>${spring.boot.version}</version>
+				</plugin>
+			</plugins>
+		</pluginManagement>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.3</version>
+				<configuration>
+					<source>1.8</source>
+					<target>1.8</target>
+					<encoding>${project.build.sourceEncoding}</encoding>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-resources-plugin</artifactId>
+				<version>2.4</version>
+				<configuration>
+					<encoding>${project.build.sourceEncoding}</encoding>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
 
 </project>

+ 1 - 2
java/sp-app/src/main/assembly/bin/restart.sh

@@ -1,5 +1,4 @@
 #!/bin/bash
 cd `dirname $0`
 ./stop.sh
-./start.sh
-
+./start.sh

+ 1 - 1
java/sp-app/src/main/java/com/anji/sp/service/impl/SpAppReqServiceImpl.java

@@ -286,7 +286,7 @@ public class SpAppReqServiceImpl implements SpAppReqService {
 				// 查询是否需要强制更新
 				List<String> list = vo.getNeedUpdateVersionList();
 				long version = spVersionService.selectUpdateVersion(list, vo.getCreateDate(), vo.getAppId());
-				if (paramVersion < version) {
+				if (paramVersion <=version) {
 					respVo.setUpdateStatus("2");
 				}
 			}

+ 1 - 1
java/sp-app/src/main/resources/application-dev.properties

@@ -1,6 +1,6 @@
 # \u8BE5\u6587\u4EF6\u914D\u7F6E\u4F1A\u7EE7\u627Fbootstrap.xml\uFF0C\u53EA\u9700\u8981\u914D\u7F6E\u6570\u636E\u5E93\u7B49\u5DEE\u5F02\u914D\u7F6E
 spring.datasource.druid.driver-class-name=com.mysql.cj.jdbc.Driver
-spring.datasource.druid.url=jdbc:mysql://10.108.26.197:3306/aj_app_sp?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
+spring.datasource.druid.url=jdbc:mysql://10.108.26.197:3306/aj_app_sp_dev?characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
 spring.datasource.druid.username=root
 spring.datasource.druid.password=appuser@anji
 

+ 3 - 2
java/sp-app/src/main/resources/application.properties

@@ -5,7 +5,7 @@ server.port=8831
 
 #mysql数据库连接
 spring.datasource.druid.driver-class-name=com.mysql.cj.jdbc.Driver
-spring.datasource.druid.url=jdbc:mysql://114.55.230.80:3306/aj_app_sp?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
+spring.datasource.druid.url=jdbc:mysql://114.55.230.80:3306/aj_app_sp_dev?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&useTimezone=true&serverTimezone=GMT%2B8
 spring.datasource.druid.username=root
 spring.datasource.druid.password=QopraffaQWPRPPR123
 spring.datasource.druid.initial-size=1
@@ -67,7 +67,7 @@ pagehelper.params=count=countSql
 
 
 #服务器地址
-customer.environment.path=https://openappsp.anji-plus.com
+customer.environment.path=http://127.0.0.1:10022
 #apk 下载路径前缀
 file.apk.url=http://192.168.0.105:8831/sp/download/
 # 上传你文件地址  upload.filename + /apk  查看 sp-version util FileProfileConfig、FileNameEnum、FileUploadUtils
@@ -140,3 +140,4 @@ sp.minio.accesskey=minioadmin
 sp.minio.secretkey=minioadmin
 sp.minio.url=http://124.222.192.60:9000
 sp.minio.bucketName=mytest
+sp.minio.preview=https://fqgz.flowbb.cn

+ 3 - 2
java/sp-app/src/main/resources/mapper/SpUserAppRoleMapper.xml

@@ -27,9 +27,10 @@
             resultType="com.anji.sp.model.vo.SpAppInfoVO">
     select a.*, b.title operation_title, b.oper_name operation_name,b.oper_time operation_time FROM (
 	select 
-	 a.promote_name,a.promote_version,a.promote_desc,a.promote_introduction,
+	 a.promote_name,a.promote_version,a.promote_desc,a.promote_introduction,a.logo_url,
 	  a.app_id, a.app_key, a.`name` from  sp_application a where a.enable_flag = 1 and a.delete_flag = 0) a
-	LEFT JOIN (select g.*  FROM (select s.app_id,MAX(s.oper_id) oper_id,MAX(s.oper_time) oper_time from sp_oper_log s GROUP BY s.app_id) log
+	LEFT JOIN (select g.*  FROM (select s.app_id,MAX(s.oper_id) oper_id,
+	MAX(s.oper_time) oper_time from sp_oper_log s GROUP BY s.app_id) log
 	LEFT JOIN sp_oper_log g on log.oper_id = g.oper_id) b on a.app_id=b.app_id
     </select>
 

+ 4 - 1
java/sp-auth/src/main/java/com/anji/sp/config/SecurityConfig.java

@@ -99,7 +99,10 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
                   "/login/**",
                   "/phone/**", 
                   "/download/**", 
-                  "/upload/uploadMinio", 
+                  "/upload/uploadMinio",
+                  "/upload/uploadFaceImage",
+                  "/upload/getPreview",
+                  "/upload/getFile",
                   "/captcha/**").anonymous()
                 .antMatchers(
                         HttpMethod.GET,

+ 31 - 25
java/sp-auth/src/main/java/com/anji/sp/filter/JwtAuthenticationTokenFilter.java

@@ -23,30 +23,36 @@ import java.io.IOException;
 @Component
 public class JwtAuthenticationTokenFilter extends OncePerRequestFilter {
 
-    private static final String SLASH =  "/sp/";
-
-    @Autowired
-    private TokenService tokenService;
-
-    @Override
-    protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
-            throws ServletException, IOException {
-        String uri = request.getRequestURI();
-        if (SLASH.equals(uri)) {
-            response.setStatus(302);
-            response.setHeader("location", request.getContextPath() + "/index.html");
-            return;
-        }
-
-        LoginUser loginUser = tokenService.getLoginUser(request);
-        if (StringUtils.isNotNull(loginUser) && StringUtils.isNull(SecurityUtils.getAuthentication())) {
-            tokenService.verifyToken(loginUser);
-            UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginUser, null, loginUser.getAuthorities());
-            authenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
-            //安全环境是通过调用 SecurityContextHolder.getContext().setAuthentication(…​), 传递到返回的验证对象建立的。
-            SecurityContextHolder.getContext().setAuthentication(authenticationToken);
-        }
-        chain.doFilter(request, response);
-    }
+	private static final String SLASH = "/sp/";
+
+	@Autowired
+	private TokenService tokenService;
+
+	@Override
+	protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
+			throws ServletException, IOException {
+		String uri = request.getRequestURI();
+		if (SLASH.equals(uri)) {
+			response.setStatus(302);
+			response.setHeader("location", request.getContextPath() + "/index.html");
+			return;
+		}
+		String path = request.getRequestURI();
+		if (path.contains("sp/upload/uploadMinio")) {
+			chain.doFilter(request, response);
+			return;
+		}
+		LoginUser loginUser = tokenService.getLoginUser(request);
+		if (StringUtils.isNotNull(loginUser) && StringUtils.isNull(SecurityUtils.getAuthentication())) {
+			tokenService.verifyToken(loginUser);
+			UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginUser,
+					null, loginUser.getAuthorities());
+			authenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request));
+			// 安全环境是通过调用 SecurityContextHolder.getContext().setAuthentication(…​),
+			// 传递到返回的验证对象建立的。
+			SecurityContextHolder.getContext().setAuthentication(authenticationToken);
+		}
+		chain.doFilter(request, response);
+	}
 
 }

+ 1 - 1
java/sp-auth/src/main/java/com/anji/sp/model/vo/SpAppInfoVO.java

@@ -34,7 +34,7 @@ public class SpAppInfoVO implements Serializable {
     @ApiModelProperty("操作日志信息用户名")
     private String operationName;
 
-    @ApiModelProperty("logo Url")
+    @ApiModelProperty("logo_url")
     private String logoUrl;
     @ApiModelProperty("推广版本/环境信息")
     private String promoteVersion;

+ 6 - 5
java/sp-auth/src/main/java/com/anji/sp/service/impl/SpApplicationServiceImpl.java

@@ -143,11 +143,12 @@ public class SpApplicationServiceImpl implements SpApplicationService {
         if (Objects.isNull(res)) {
             return ResponseModel.errorMsg(RepCodeEnum.APP_NOT_EXIST);
         }
-        res.setEnableFlag(UserStatus.DISABLE.getIntegerCode());
-        res.setDeleteFlag(IsDeleteEnum.DELETE.getIntegerCode());
-        res.setUpdateBy(SecurityUtils.getUserId());
-        res.setUpdateDate(new Date());
-        int update = spApplicationMapper.update(res, objectQueryWrapper);
+//        res.setAppId(reqData.getAppId());
+//        res.setEnableFlag(UserStatus.DISABLE.getIntegerCode());
+//        res.setDeleteFlag(IsDeleteEnum.DELETE.getIntegerCode());
+//        res.setUpdateBy(SecurityUtils.getUserId());
+//        res.setUpdateDate(new Date());
+        int update = spApplicationMapper.deleteById(reqData.getAppId());
         if (update > 0) {
             return ResponseModel.success();
         }

+ 20 - 1
java/sp-version/src/main/java/com/anji/sp/controller/SpFileDownloadController.java

@@ -27,7 +27,8 @@ public class SpFileDownloadController {
 
     @Autowired
     private SpDownloadService spDownloadService;
-
+    @Autowired 
+    SpUploadService spUploadService;
     /**
      * 文件上传
      * @param spUploadVO
@@ -46,5 +47,23 @@ public class SpFileDownloadController {
     public ResponseEntity<byte[]> uploadFile(HttpServletRequest request, HttpServletResponse response, @PathVariable("sdk") String sdk) {
         return spDownloadService.download(request, response, sdk);
     }
+    /**
+     * 文件上传
+     * @param spUploadVO
+     * @return
+     */
+
+    /**
+     * 文件下载
+     *
+     * @param sdk     appId
+     *                sdktest102-1629448268933-2-b6af895c0d1146d5a10d4367a664721e.apk
+     * @return
+     */
+    @ApiOperation(value = "文件下载", notes = "文件下载")
+    @GetMapping(value = "/file/download/{sdk}")
+    public ResponseEntity<byte[]> download(HttpServletRequest request, HttpServletResponse response, @PathVariable("sdk") String sdk) {
+        return spUploadService.download(request, response, sdk);
+    }
 }
 

+ 28 - 2
java/sp-version/src/main/java/com/anji/sp/controller/SpFileUploadController.java

@@ -1,5 +1,6 @@
 package com.anji.sp.controller;
 
+import java.io.File;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Objects;
@@ -7,6 +8,8 @@ import java.util.Objects;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -45,7 +48,7 @@ public class SpFileUploadController {
 
 	/**
 	 * 文件上传
-	 * 
+	 *
 	 * @param spUploadVO
 	 * @return
 	 */
@@ -91,11 +94,34 @@ public class SpFileUploadController {
 	@RequestMapping("/uploadMinio")
 	public Map<String, Object> uploadCard(@RequestBody String image) {
 		JSONObject json = JSONObject.parseObject(image);
-		FileUploadUtils.saveImage(json.getString("base64"));
+		try {
+			FileUploadUtils.saveImage(json.getString("base64"));
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+
 		// SUCCESS(100,"操作成功!"),
 		Map<String, Object> map = new HashMap<>();
 		map.put("code", 100);
 		map.put("msg", "操作成功!");
 		return map;
 	}
+
+	@RequestMapping("/uploadFaceImage")
+	public Map<String, Object> uploadFaceImage(@RequestBody String image) {
+		JSONObject json = JSONObject.parseObject(image);
+		String imagePath="";
+		try {
+			imagePath = FileUploadUtils.saveFaceImage(json.getString("base64"),json.getString("filePath"));
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		// SUCCESS(100,"操作成功!"),
+		Map<String, Object> map = new HashMap<>();
+		map.put("code", 100);
+		map.put("msg", "操作成功!");
+		map.put("imagePath",imagePath);
+		return map;
+	}
+
 }

+ 16 - 2
java/sp-version/src/main/java/com/anji/sp/service/impl/MinioFileHandle.java

@@ -5,6 +5,7 @@ import java.io.InputStream;
 
 import javax.annotation.PostConstruct;
 
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.ApplicationContext;
@@ -38,6 +39,11 @@ public class MinioFileHandle implements FileHandle,ApplicationContextAware {
 	@Value("${sp.minio.secretkey:minioadmin}")
 	public String appMinioSecretkey;
 
+	@Value("${sp.minio.preview:https://fqgz.flowbb.cn}")
+	protected String appMinioPreview;
+
+
+
 	private MinioClient minioClient;
 
 	@PostConstruct
@@ -131,8 +137,16 @@ public class MinioFileHandle implements FileHandle,ApplicationContextAware {
 
 	@Override
 	public String getPreviewUrl(String fileKey) throws Exception {
-		// TODO Auto-generated method stub
-		return null;
+		if (StringUtils.isNotBlank(fileKey) && (fileKey.startsWith("http") || fileKey.startsWith("https"))) {
+			return fileKey;
+		}
+		try {
+			String fileUrl = getObjectUrl(fileKey);
+			int index = fileUrl.indexOf("/", 8);
+			return appMinioPreview + fileUrl.substring(index);
+		} catch (Exception e) {
+			throw e;
+		}
 	}
 
 	@Override

+ 1 - 1
java/sp-version/src/main/java/com/anji/sp/service/impl/SpUploadServiceImpl.java

@@ -128,7 +128,7 @@ public class SpUploadServiceImpl implements SpUploadService {
 			if (StringUtils.isBlank(f.getFilePath())) {
 				ResponseModel.errorMsg("文件路径不存在");
 			}
-			String filename = filePath.substring(filePath.lastIndexOf(File.separator));
+			String filename = filePath.substring(filePath.lastIndexOf("/"));
 			if (StringUtils.isBlank(filename)) {
 				ResponseModel.errorMsg("文件名为空");
 			}

+ 49 - 9
java/sp-version/src/main/java/com/anji/sp/util/file/FileUploadUtils.java

@@ -23,10 +23,7 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import org.springframework.web.multipart.MultipartFile;
 
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
+import java.io.*;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
@@ -89,7 +86,6 @@ public class FileUploadUtils {
 		log.info("上传的后缀名为:" + suffixName);
 		try {
 
-	
 			// 文件大小校验
 			long size = multipartFile.getSize();
 			if (DEFAULT_MAX_SIZE != -1 && size > DEFAULT_MAX_SIZE) {
@@ -116,13 +112,13 @@ public class FileUploadUtils {
 					spUploadFileVO.setVersionNumber(apkMeta.getVersionCode() + "");
 					profileName = apkMetaInfo.getProfileName();
 					fileName = FileProfileConfig.getAndroidAPKPath().concat(profileName);
-				
+
 				} else {
 					throw new InvalidFileExceededException("请上传正确的apk文件");
 				}
 			}
 
-		// 创建临时文件
+			// 创建临时文件
 			File desc = new File(fileName);
 			if (!desc.getParentFile().exists()) {
 				desc.getParentFile().mkdirs();
@@ -224,7 +220,6 @@ public class FileUploadUtils {
 	}
 
 	public static String uuid() {
-
 		return UUID.randomUUID().toString().replace("-", "");
 	}
 
@@ -324,6 +319,52 @@ public class FileUploadUtils {
 	}
 
 	/**
+	 * 对字节数组字符串进行Base64解码并生成图片,注意处理图片前面是否加了data:image/png;这个
+	 * 
+	 * @param image 图片数据
+	 * @return
+	 */
+	public static String saveFaceImage(String imgStr,String filePath) {
+
+		if (imgStr == null) // 图像数据为空
+			return null;
+		try {
+			String suffix = imageFileSuffix(imgStr);
+			if (StringUtils.isNotEmpty(suffix)) {
+				// 去掉data:image/jpeg;这种类型的
+				String[] base64Prefix = imgStr.split("base64,");
+				if (base64Prefix != null && base64Prefix.length > 1) {
+					imgStr = base64Prefix[1];
+				}
+			}
+			// Base64解码
+			byte[] b = Base64.decodeBase64(imgStr);
+			for (int i = 0; i < b.length; ++i) {
+				if (b[i] < 0) {// 调整异常数据
+					b[i] += 256;
+				}
+			}
+			if (StringUtils.isEmpty(suffix)) {
+				suffix = getFormatName(b);
+			}
+			// TODO 这里再判断,通过二进制,如果还是失败抛出异常,
+			// 如果不存在,创建文件夹
+			String uuid = uuid();
+			// 拼接文件路径
+			String fileName = uuid + "." + suffix;
+			// 这里目前只会说图片的
+			String contentType = "image/" + suffix;
+			uploadFile(filePath, contentType, b);
+			// FileUtils.writeByteArrayToFile(fullPath, b);
+			log.info("上传图片成功"+filePath);
+			return filePath;
+		} catch (Exception e) {
+			log.error("上传图片失败:" + e.getLocalizedMessage());
+			return null;
+		}
+	}
+
+	/**
 	 * 上传文件通过文件的流
 	 * 
 	 * @param filePath
@@ -350,7 +391,6 @@ public class FileUploadUtils {
 			}
 
 		}
-
 	}
 
 	/**