Browse Source

Merge branch 'dev' into pre-production

# Conflicts:
#	blade-service/pom.xml
newStockUp
zhenghaoyu 1 year ago
parent
commit
c732340cc2
  1. 12
      README.md
  2. 4
      blade-biz-common/pom.xml
  3. 16
      blade-gateway/pom.xml
  4. 3
      blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java
  5. 16
      blade-ops/blade-xxljob-admin/pom.xml
  6. 4
      blade-ops/pom.xml
  7. 6
      blade-service-api/logpm-aftersales-api/pom.xml
  8. 4
      blade-service-api/logpm-basic-api/pom.xml
  9. 9
      blade-service-api/logpm-basicdata-api/pom.xml
  10. 4
      blade-service-api/logpm-distribution-api/pom.xml
  11. 10
      blade-service-api/logpm-factory-api/pom.xml
  12. 6
      blade-service-api/logpm-old-project-api/pom.xml
  13. 4
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/ITrayClient.java
  14. 3
      blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/ITrayScanClient.java
  15. 4
      blade-service-api/logpm-patch-api/pom.xml
  16. 6
      blade-service-api/logpm-statisticsdata-api/pom.xml
  17. 6
      blade-service-api/logpm-trunkline-api/pom.xml
  18. 6
      blade-service-api/logpm-warehouse-api/pom.xml
  19. 4
      blade-service-api/pom.xml
  20. 5
      blade-service/logpm-aftersales/pom.xml
  21. 27
      blade-service/logpm-basic/pom.xml
  22. 8
      blade-service/logpm-basicdata/pom.xml
  23. 4
      blade-service/logpm-distribution/pom.xml
  24. 19
      blade-service/logpm-factory/pom.xml
  25. 6
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/dto/OrderStatusDTO.java
  26. 2
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/IFactoryCommonService.java
  27. 83
      blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java
  28. 9
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/DealWithDataHandler.java
  29. 24
      blade-service/logpm-old-project/pom.xml
  30. 5
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/TrayClient.java
  31. 5
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/TrayScanClient.java
  32. 3
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/ITrayScanService.java
  33. 2
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/ITrayService.java
  34. 10
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/TrayScanServiceImpl.java
  35. 5
      blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/TrayServiceImpl.java
  36. 35
      blade-service/logpm-patch/pom.xml
  37. 5
      blade-service/logpm-statisticsdata/pom.xml
  38. 6
      blade-service/logpm-trunkline/pom.xml
  39. 2
      blade-service/logpm-warehouse/pom.xml
  40. 7
      blade-service/pom.xml
  41. 35
      doc/docker/README.md
  42. 23
      doc/nacos/blade-dev.yaml
  43. 19
      doc/nacos/blade-prod.yaml
  44. 19
      doc/nacos/blade-test.yaml
  45. 20
      doc/nacos/blade.yaml
  46. 135
      pom.xml
  47. 4
      script/docker/app/.env
  48. 6
      script/docker/app/deploy.sh
  49. 2
      script/docker/app/docker-compose.yml
  50. 6
      script/docker/app/nginx/web/nginx.conf

12
README.md

@ -1,20 +1,20 @@
## 版权声明
* BladeX是一个商业化软件,系列产品知识产权归**上海布雷德科技有限公司**独立所有
* 您一旦开始复制、下载、安装或者使用本产品,即被视为完全理解并接受本协议的各项条款
* 更多详情请看:[BladeX商业授权许可协议](/LICENSE)
* 更多详情请看:[BladeX商业授权许可协议](https://license.bladex.cn)
## 答疑流程
>1. 遇到问题或Bug
>2. 业务型问题打断点调试尝试找出问题所在
>3. 系统型问题通过百度、谷歌、社区查找解决方案
>4. 未解决问题则进入技术社区进行发帖提问:[https://sns.bladex.vip/](https://sns.bladex.vip/)
>4. 未解决问题则进入技术社区进行发帖提问:[https://sns.bladex.cn](https://sns.bladex.cn)
>5. 将帖子地址发至商业群,特别简单三言两语就能描述清楚的也可在答疑时间内发至商业群提问
>6. 发帖的时候一定要描述清楚,详细描述遇到问题的**重现步骤**、**报错详细信息**、**相关代码与逻辑**、**使用软件版本**以及**操作系统版本**,否则随意发帖提问将会提高我们的答疑难度。
## 答疑时间
* 工作日:9:00 ~ 17:00 提供答疑,周末、节假日休息,暂停答疑
* 请勿**私聊提问**,以免被其他用户的消息覆盖从而无法获得答疑
* 答疑时间外遇到问题可以将问题发帖至[技术社区](https://sns.bladex.vip/),我们后续会逐个回复
* 答疑时间外遇到问题可以将问题发帖至[技术社区](https://sns.bladex.cn),我们后续会逐个回复
## 授权范围
* 专业版:只可用于**个人学习**及**个人私活**项目,不可用于公司或团队,不可泄露给任何第三方
@ -22,9 +22,9 @@
* 共同遵守:若甲方需要您提供项目源码,则需代为甲方购买BladeX企业授权,甲方购买后续的所有项目都无需再次购买授权
## 商用权益
* ✔ 遵守[商业协议](/LICENSE)的前提下,将BladeX系列产品用于授权范围内的商用项目,并上线运营
* ✔ 遵守[商业协议](/LICENSE)的前提下,不限制项目数,不限制服务器数
* ✔ 遵守[商业协议](/LICENSE)的前提下,将自行编写的业务代码申请软件著作权
* ✔ 遵守[商业协议](https://license.bladex.cn)的前提下,将BladeX系列产品用于授权范围内的商用项目,并上线运营
* ✔ 遵守[商业协议](https://license.bladex.cn)的前提下,不限制项目数,不限制服务器数
* ✔ 遵守[商业协议](https://license.bladex.cn)的前提下,将自行编写的业务代码申请软件著作权
## 何为侵权
* ❌ 不遵守商业协议,私自销售商业源码

4
blade-biz-common/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -29,7 +29,7 @@
<scope>provided</scope>
</dependency>
<!-- 二维码生成jar包-->
<!-- 二维码生成jar包-->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>

16
blade-gateway/pom.xml

@ -5,7 +5,7 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -78,18 +78,10 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<username>${docker.username}</username>
<password>${docker.password}</password>
<repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
<tag>${project.version}</tag>
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
<buildArgs>
<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
<skip>false</skip>
<skip>${docker.fabric.skip}</skip>
</configuration>
</plugin>
<plugin>

3
blade-gateway/src/main/java/org/springblade/gateway/filter/AuthFilter.java

@ -81,8 +81,9 @@ public class AuthFilter implements GlobalFilter, Ordered {
//判断 Token 状态
if (jwtProperties.getState()) {
String tenantId = String.valueOf(claims.get(TokenConstant.TENANT_ID));
String clientId = String.valueOf(claims.get(TokenConstant.CLIENT_ID));
String userId = String.valueOf(claims.get(TokenConstant.USER_ID));
String accessToken = JwtUtil.getAccessToken(tenantId, userId, token);
String accessToken = JwtUtil.getAccessToken(tenantId, clientId, userId, token);
if (!token.equalsIgnoreCase(accessToken)) {
return unAuth(resp, "令牌已失效");
}

16
blade-ops/blade-xxljob-admin/pom.xml

@ -3,7 +3,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@ -92,18 +92,10 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<username>${docker.username}</username>
<password>${docker.password}</password>
<repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
<tag>${project.version}</tag>
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
<buildArgs>
<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
<skip>false</skip>
<skip>${docker.fabric.skip}</skip>
</configuration>
</plugin>
<plugin>

4
blade-ops/pom.xml

@ -5,13 +5,13 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-ops</artifactId>
<name>${project.artifactId}</name>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<packaging>pom</packaging>
<modules>

6
blade-service-api/logpm-aftersales-api/pom.xml

@ -7,12 +7,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-aftersales-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</project>

4
blade-service-api/logpm-basic-api/pom.xml

@ -7,12 +7,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-basic-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</project>

9
blade-service-api/logpm-basicdata-api/pom.xml

@ -6,18 +6,23 @@
<parent>
<groupId>org.springblade</groupId>
<version>3.2.0.RELEASE</version>
<artifactId>blade-service-api</artifactId>
<version>3.1.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-basicdata-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
</dependencies>

4
blade-service-api/logpm-distribution-api/pom.xml

@ -7,12 +7,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-distribution-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</project>

10
blade-service-api/logpm-factory-api/pom.xml

@ -2,18 +2,16 @@
<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>
<groupId>org.springblade</groupId>
<artifactId>blade-service-api</artifactId>
<version>3.1.0.RELEASE</version>
<groupId>org.springblade</groupId>
<version>3.2.0.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.springblade</groupId>
<artifactId>logpm-factory-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>${bladex.project.version}</version>
<packaging>jar</packaging>
</project>

6
blade-service-api/logpm-old-project-api/pom.xml

@ -7,12 +7,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-old-project-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</project>

4
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/ITrayClient.java

@ -40,6 +40,10 @@ public interface ITrayClient {
@GetMapping(API_PREFIX+"/getAllTrayByWarehouseId")
List<TrayEntity> getAllTrayByWarehouseId(@RequestParam Integer oldWarehouseId);
@GetMapping(API_PREFIX+"/getTrayById")
TrayEntity getTrayById(@RequestParam Integer trayId);
// @GetMapping(API_PREFIX + "/getOrderByOrderSelfNum")
// List<OrderEntity> getOrderByOrderSelfNum(@RequestParam String orderSelfNum);

3
blade-service-api/logpm-old-project-api/src/main/java/com/logpm/oldproject/feign/ITrayScanClient.java

@ -16,6 +16,9 @@ public interface ITrayScanClient {
@GetMapping(API_PREFIX + "/getEntityByTrayScanId")
TrayScanEntity getEntityByTrayScanId(@RequestParam Integer trayScanId);
@GetMapping(API_PREFIX + "/getEntityByTrayIdAndOldWarehouseIdAndBindStatus")
TrayScanEntity getEntityByTrayIdAndOldWarehouseIdAndBindStatus(@RequestParam Integer trayId, @RequestParam String oldWarehouseId, @RequestParam Integer bindStatus);
// @GetMapping(API_PREFIX + "/getEntityByOrderCode")
// OrderCountEntity getEntityByOrderCode(@RequestParam String orderCode, @RequestParam Integer oldWarehouseId);

4
blade-service-api/logpm-patch-api/pom.xml

@ -7,12 +7,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-patch-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<packaging>jar</packaging>

6
blade-service-api/logpm-statisticsdata-api/pom.xml

@ -7,12 +7,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-statisticsdata-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</project>

6
blade-service-api/logpm-trunkline-api/pom.xml

@ -7,12 +7,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-trunkline-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</project>

6
blade-service-api/logpm-warehouse-api/pom.xml

@ -7,7 +7,7 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-distribution-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
@ -15,12 +15,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-warehouse-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</project>

4
blade-service-api/pom.xml

@ -5,14 +5,14 @@
<parent>
<artifactId>BladeX-Biz</artifactId>
<groupId>org.springblade</groupId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<description>BladeX 微服务API集合</description>
<modelVersion>4.0.0</modelVersion>
<artifactId>blade-service-api</artifactId>
<name>${project.artifactId}</name>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<packaging>pom</packaging>
<modules>
<!--工厂数据-->

5
blade-service/logpm-aftersales/pom.xml

@ -7,12 +7,13 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-aftersales</artifactId>
<version>${bladex.project.version}</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
@ -29,5 +30,5 @@
<scope>compile</scope>
</dependency>
</dependencies>
</project>

27
blade-service/logpm-basic/pom.xml

@ -6,9 +6,14 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-basic</artifactId>
<version>${bladex.project.version}</version>
<dependencies>
<dependency>
<groupId>org.springblade</groupId>
@ -57,27 +62,13 @@
</dependency>
</dependencies>
<groupId>org.springblade</groupId>
<artifactId>logpm-basic</artifactId>
<version>${bladex.project.version}</version>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<username>${docker.username}</username>
<password>${docker.password}</password>
<repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
<tag>${project.version}</tag>
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
<buildArgs>
<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
<skip>false</skip>
<skip>${docker.fabric.skip}</skip>
</configuration>
</plugin>
<plugin>

8
blade-service/logpm-basicdata/pom.xml

@ -7,7 +7,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<dependencies>
<dependency>
@ -52,7 +52,7 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-basic-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</dependency>
<dependency>
@ -74,7 +74,7 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-warehouse-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
@ -83,7 +83,7 @@
<groupId>org.springblade</groupId>
<artifactId>logpm-basicdata</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<build>
<plugins>

4
blade-service/logpm-distribution/pom.xml

@ -7,7 +7,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
@ -107,7 +107,7 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-system-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>

19
blade-service/logpm-factory/pom.xml

@ -7,10 +7,9 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-factory</artifactId>
<name>${project.artifactId}</name>
@ -41,20 +40,20 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-factory-api</artifactId>
<version>${bladex.project.version}</version>
<version>3.2.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-old-project-api</artifactId>
<version>${bladex.project.version}</version>
<version>3.2.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-basic-api</artifactId>
<version>${bladex.project.version}</version>
<version>3.2.0.RELEASE</version>
</dependency>
@ -86,32 +85,32 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-distribution-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-basicdata-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-trunkline-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-warehouse-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-resource-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>

6
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/dto/OrderStatusDTO.java

@ -62,6 +62,12 @@ public class OrderStatusDTO implements Serializable {
@NotEmpty(message = "送货任务ID不能为空")
private String distributionContactId;
@NotEmpty(message = "托盘id")
private Integer trayId;
@NotEmpty(message = "托盘编码")
private Integer trayNo;
/**
* 验证参数是否都存在

2
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/IFactoryCommonService.java

@ -3,4 +3,6 @@ package com.logpm.factory.comfac.service;
public interface IFactoryCommonService {
void syncTrayTypeData(String unitNo, Integer trayId, String currentWarehouseId);
}

83
blade-service/logpm-factory/src/main/java/com/logpm/factory/comfac/service/impl/FactoryCommonServiceImpl.java

@ -1,18 +1,101 @@
package com.logpm.factory.comfac.service.impl;
import com.logpm.basicdata.entity.BasicdataTrayEntity;
import com.logpm.basicdata.entity.BasicdataWarehouseEntity;
import com.logpm.basicdata.feign.IBasicdataTrayClient;
import com.logpm.basicdata.feign.IBasicdataWarehouseClient;
import com.logpm.factory.comfac.service.IFactoryCommonService;
import com.logpm.oldproject.entity.TrayEntity;
import com.logpm.oldproject.entity.TrayScanEntity;
import com.logpm.oldproject.feign.ITrayClient;
import com.logpm.oldproject.feign.ITrayScanClient;
import com.logpm.warehouse.feign.IWarehouseTrayTypeClient;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.common.exception.CustomerException;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@Slf4j
@Service
@AllArgsConstructor
public class FactoryCommonServiceImpl implements IFactoryCommonService {
private final IBasicdataWarehouseClient basicdataWarehouseClient;
private final IBasicdataTrayClient basicdataTrayClient;
private final IWarehouseTrayTypeClient warehouseTrayTypeClient;
private final ITrayClient trayClient;
private final ITrayScanClient trayScanClient;
@Override
public void syncTrayTypeData(String unitNo, Integer trayId, String oldWarehouseId) {
//先判断新系统仓库信息是否存在
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getWarehouseByOldId(Integer.parseInt(oldWarehouseId));
if(Objects.isNull(warehouseEntity)){
log.error("###############syncTrayTypeData: 仓库信息不存在 oldWarehouseId={}",oldWarehouseId);
throw new CustomerException(403,"仓库信息不存在");
}
Long newWarehouseId = warehouseEntity.getId();
//判断托盘是否已经存在
BasicdataTrayEntity basicdataTrayEntity = basicdataTrayClient.getTrayByTrayCode("T" + trayId);
if(Objects.isNull(basicdataTrayEntity)){
//如果托盘不存在就去同步该托盘
TrayEntity trayEntity = trayClient.getTrayById(trayId);
basicdataTrayEntity = new BasicdataTrayEntity();
basicdataTrayEntity.setTenantId("627683");
basicdataTrayEntity.setCreateUser(1649331096967450625L);
basicdataTrayEntity.setUpdateUser(1649331096967450625L);
basicdataTrayEntity.setCreateDept(1649331096241836033L);
basicdataTrayEntity.setPalletName(trayEntity.getTrayNo());
basicdataTrayEntity.setPalletCode("T"+trayEntity.getId());
basicdataTrayEntity.setWarehouseId(newWarehouseId);
basicdataTrayEntity.setTrayStatus(trayEntity.getStatus()+"");
basicdataTrayEntity.setType(1);
basicdataTrayEntity.setOldId(trayId);
// basicdataTrayEntity.setNowWarehouseId(nowNewWarehouseId);
basicdataTrayClient.addTray(basicdataTrayEntity);
}
//把包件打托到托盘上
TrayScanEntity trayScanEntity = trayScanClient.getEntityByTrayIdAndOldWarehouseIdAndBindStatus(trayId,oldWarehouseId,1);
String trayType = "100";
if(!Objects.isNull(trayScanEntity)){
Integer type = trayScanEntity.getType();
if(1==type){
trayType = "60";
}else if(2==type){
trayType = "30";
}else if(3==type){
trayType = "50";
}else if(4==type){
trayType = "100";
}else if(5==type){
trayType = "10";
}else if(6==type){
trayType = "20";
}
}
Map<String,Object> map = new HashMap<>();
map.put("trayType",trayType);
map.put("trayCode","T"+trayId);
map.put("warehouseId",newWarehouseId);
map.put("orderPackageCode",unitNo);
//新系统保存打托方式
boolean b = warehouseTrayTypeClient.orderScanOrderPackageCode(map);
if(!b){
log.error("################syncTrayTypeData: 包件打托失败 unitNo={} trayCode={}",unitNo,"T"+trayId);
throw new CustomerException(403,"包件打托失败");
}
log.info("################syncTrayTypeData: 包件打托成功 unitNo={}",unitNo);
}
}

9
blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/DealWithDataHandler.java

@ -1,6 +1,7 @@
package com.logpm.factory.receiver;
import com.logpm.factory.comfac.dto.OrderStatusDTO;
import com.logpm.factory.comfac.service.IFactoryCommonService;
import com.logpm.factory.pan.service.IPanFactoryDataService;
import com.logpm.oldproject.feign.IAdvanceDetailClient;
import com.rabbitmq.client.Channel;
@ -16,6 +17,7 @@ import org.springframework.stereotype.Component;
import java.io.IOException;
import java.util.Map;
import java.util.Objects;
/**
@ -32,6 +34,8 @@ public class DealWithDataHandler {
private IAdvanceDetailClient advanceDetailClient;
@Autowired
private IPanFactoryDataService panFactoryDataService;
@Autowired
private IFactoryCommonService factoryCommonService;
private Integer retryCount = 1;
@ -43,6 +47,7 @@ public class DealWithDataHandler {
String status = orderStatusDTO.getStatus();
String unitNo = orderStatusDTO.getUnitNo();
String operationTime = orderStatusDTO.getOperationTime();
Integer trayId = orderStatusDTO.getTrayId();
if ("4".equals(status)) {
//继续判断是否到达目的仓
String currentWarehouseId = orderStatusDTO.getCurrentWarehouse();//当前仓Id
@ -64,6 +69,10 @@ public class DealWithDataHandler {
//真正的处理需要的数据
try {
panFactoryDataService.handleDataToPlatform(unitNo, operationTime);
//同步打托数据
if(!Objects.isNull(trayId)){
factoryCommonService.syncTrayTypeData(unitNo,trayId,currentWarehouseId);
}
} catch (Exception e) {
e.printStackTrace();
}

24
blade-service/logpm-old-project/pom.xml

@ -7,12 +7,12 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-old-project</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<dependencies>
<dependency>
@ -33,6 +33,10 @@
<groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-starter-liteflow</artifactId>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-core-test</artifactId>
@ -49,18 +53,10 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<username>${docker.username}</username>
<password>${docker.password}</password>
<repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
<tag>${project.version}</tag>
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
<buildArgs>
<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
<skip>false</skip>
<skip>${docker.fabric.skip}</skip>
</configuration>
</plugin>
<plugin>
@ -69,5 +65,5 @@
</plugin>
</plugins>
</build>
</project>

5
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/TrayClient.java

@ -19,4 +19,9 @@ public class TrayClient implements ITrayClient{
public List<TrayEntity> getAllTrayByWarehouseId(Integer oldWarehouseId) {
return trayService.getAllByWarehouseId(oldWarehouseId);
}
@Override
public TrayEntity getTrayById(Integer trayId) {
return trayService.getTrayById(trayId);
}
}

5
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/feign/TrayScanClient.java

@ -17,4 +17,9 @@ public class TrayScanClient implements ITrayScanClient {
public TrayScanEntity getEntityByTrayScanId(Integer trayScanId) {
return trayScanService.getEntityByTrayScanId(trayScanId);
}
@Override
public TrayScanEntity getEntityByTrayIdAndOldWarehouseIdAndBindStatus(Integer trayId, String oldWarehouseId, Integer bindStatus) {
return trayScanService.getEntityByTrayIdAndOldWarehouseIdAndBindStatus(trayId,oldWarehouseId,bindStatus);
}
}

3
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/ITrayScanService.java

@ -4,4 +4,7 @@ import com.logpm.oldproject.entity.TrayScanEntity;
public interface ITrayScanService {
TrayScanEntity getEntityByTrayScanId(Integer trayScanId);
TrayScanEntity getEntityByTrayIdAndOldWarehouseIdAndBindStatus(Integer trayId, String oldWarehouseId, Integer bindStatus);
}

2
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/ITrayService.java

@ -9,4 +9,6 @@ public interface ITrayService {
List<TrayEntity> getAllByWarehouseId(Integer warehouseId);
TrayEntity getTrayById(Integer trayId);
}

10
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/TrayScanServiceImpl.java

@ -1,5 +1,6 @@
package com.logpm.oldproject.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.logpm.oldproject.entity.TrayScanEntity;
import com.logpm.oldproject.mapper.TrayScanMapper;
import com.logpm.oldproject.service.ITrayScanService;
@ -16,4 +17,13 @@ public class TrayScanServiceImpl implements ITrayScanService {
public TrayScanEntity getEntityByTrayScanId(Integer trayScanId) {
return trayScanMapper.selectById(trayScanId);
}
@Override
public TrayScanEntity getEntityByTrayIdAndOldWarehouseIdAndBindStatus(Integer trayId, String oldWarehouseId, Integer bindStatus) {
QueryWrapper<TrayScanEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("tray_id",trayId)
.eq("warehouse_id",oldWarehouseId)
.eq("bind_status",bindStatus);
return trayScanMapper.selectOne(queryWrapper);
}
}

5
blade-service/logpm-old-project/src/main/java/com/logpm/oldproject/service/impl/TrayServiceImpl.java

@ -23,4 +23,9 @@ public class TrayServiceImpl implements ITrayService {
return trayMapper.selectList(queryWrapper);
}
@Override
public TrayEntity getTrayById(Integer trayId) {
return trayMapper.selectById(trayId);
}
}

35
blade-service/logpm-patch/pom.xml

@ -7,7 +7,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<artifactId>logpm-patch</artifactId>
@ -42,34 +42,57 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-basicdata-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-old-project-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-distribution-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-warehouse-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-basic-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<configuration>
<username>${docker.username}</username>
<password>${docker.password}</password>
<repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
<tag>${project.version}</tag>
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
<buildArgs>
<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

5
blade-service/logpm-statisticsdata/pom.xml

@ -7,11 +7,13 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-statisticsdata</artifactId>
<version>${bladex.project.version}</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
@ -29,5 +31,4 @@
</dependencies>
</project>

6
blade-service/logpm-trunkline/pom.xml

@ -7,12 +7,14 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>
<artifactId>logpm-trunkline</artifactId>
<version>${bladex.project.version}</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>org.springblade</groupId>
@ -34,7 +36,7 @@
<dependency>
<groupId>org.springblade</groupId>
<artifactId>logpm-trunkline-api</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>

2
blade-service/logpm-warehouse/pom.xml

@ -7,7 +7,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-service</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<groupId>org.springblade</groupId>

7
blade-service/pom.xml

@ -7,17 +7,15 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>BladeX-Biz</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
</parent>
<artifactId>blade-service</artifactId>
<name>${project.artifactId}</name>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<packaging>pom</packaging>
<description>微服务集合</description>
<modules>
<!--工厂数据-->
<module>logpm-factory</module>
@ -65,6 +63,7 @@
<artifactId>blade-dict-api</artifactId>
<version>${bladex.project.version}</version>
</dependency>
<dependency>
<groupId>org.springblade</groupId>
<artifactId>blade-user-api</artifactId>

35
doc/docker/README.md

@ -4,9 +4,9 @@
```
<servers>
<server>
<id>192.168.0.157</id>
<id>192.168.0.188</id>
<username>admin</username>
<password>Harbor12345</password>
<password>admin12345</password>
<configuration>
<email>smallchill@163.com</email>
</configuration>
@ -14,13 +14,13 @@
</servers>
<pluginGroups>
<pluginGroup>com.spotify</pluginGroup>
<pluginGroup>io.fabric8</pluginGroup>
</pluginGroups>
```
### 2. docker开启远程访问
如果没有远程访问,会报 `Connect to 192.168.0.157:2375 [/192.168.0.157] failed: Connection refused: connect`
如果没有远程访问,会报 `Connect to 192.168.0.188:2375 [/192.168.0.188] failed: Connection refused: connect`
在`/usr/lib/systemd/system/docker.service`,配置远程访问。主要是在[Service]这个部分,加上下面两个参数:
@ -49,7 +49,7 @@ ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
```
{
"registry-mirrors": ["https://3dse7md.mirror.aliyuncs.com"],
"insecure-registries":["192.168.0.157"]
"insecure-registries":["192.168.0.188"]
}
```
@ -59,18 +59,10 @@ ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<username>${docker.username}</username>
<password>${docker.password}</password>
<repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
<tag>${project.version}</tag>
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
<buildArgs>
<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
<skip>false</skip>
<skip>${docker.fabric.skip}</skip>
</configuration>
</plugin>
</plugins>
@ -80,9 +72,9 @@ ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix://var/run/docker.sock
### 5. 在每个需要构建子项目的根目录下加入Dockerfile,内容可参考如下
```
FROM adoptopenjdk/openjdk8-openj9:alpine-slim
FROM bladex/alpine-java:openjdk8-openj9_cn_slim
MAINTAINER smallchill@163.com
MAINTAINER bladejava@qq.com
RUN mkdir -p /blade/gateway
@ -100,10 +92,15 @@ CMD ["--spring.profiles.active=test"]
### 6. 在工程根目录的docker-compose.yml下加入配置,内容可参考如下
```
blade-gateway:
image: "${REGISTER}/blade/blade-gateway:${TAG}"
image: "${REGISTER}/blade-gateway:${TAG}"
ports:
- 80:80
networks:
blade_net:
ipv4_address: 192.168.2.1
```
### 7. 一切配置完毕,采用fabric插件命令执行构建推送:
```
mvn clean package docker:build docker:push
```

23
doc/nacos/blade-dev.yaml

@ -17,10 +17,12 @@ spring:
#driver-class-name: oracle.jdbc.OracleDriver
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#driver-class-name: dm.jdbc.driver.DmDriver
#driver-class-name: com.yashandb.jdbc.Driver
druid:
# MySql、PostgreSQL、SqlServer、DaMeng校验
validation-query: select 1
# Oracle校验
# Oracle、YashanDB校验
#oracle: true
#validation-query: select 1 from dual
#项目模块集中配置
@ -30,14 +32,13 @@ blade:
enabled: false
address: redis://127.0.0.1:6379
#多团队协作服务配置
ribbon:
rule:
#开启配置
enabled: true
#负载均衡优先调用的ip段
prior-ip-pattern:
- 192.168.0.*
- 127.0.0.1
loadbalancer:
#开启配置
enabled: true
#负载均衡优先调用的ip段
prior-ip-pattern:
- 192.168.0.*
- 127.0.0.1
#通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)
datasource:
dev:
@ -61,3 +62,7 @@ blade:
#url: jdbc:dm://127.0.0.1:5236/BLADEX?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8
#username: BLADEX
#password: BLADEX
# YashanDB
#url: jdbc:yasdb://127.0.0.1:1688/BLADEX
#username: BLADEX
#password: BLADEX

19
doc/nacos/blade-prod.yaml

@ -4,7 +4,7 @@ spring:
##redis 单机环境配置
##将docker脚本部署的redis服务映射为宿主机ip
##生产环境推荐使用阿里云高可用redis服务并设置密码
host: 192.168.0.157
host: 192.168.0.188
port: 3379
password:
database: 0
@ -15,13 +15,16 @@ spring:
# commandTimeout: 5000
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
#driver-class-name: org.postgresql.Driver
#driver-class-name: oracle.jdbc.OracleDriver
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#driver-class-name: org.postgresql.Driver
#driver-class-name: oracle.jdbc.OracleDriver
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#driver-class-name: dm.jdbc.driver.DmDriver
#driver-class-name: com.yashandb.jdbc.Driver
druid:
# MySql、PostgreSQL、SqlServer校验
# MySql、PostgreSQL、SqlServer、DaMeng校验
validation-query: select 1
# Oracle校验
# Oracle、YashanDB校验
#oracle: true
#validation-query: select 1 from dual
#项目模块集中配置
@ -32,10 +35,10 @@ blade:
enabled: false
##将docker脚本部署的redis服务映射为宿主机ip
##生产环境推荐使用阿里云高可用redis服务并设置密码
address: redis://192.168.0.157:3379
address: redis://192.168.0.188:3379
#通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)
datasource:
prod:
url: jdbc:mysql://192.168.0.157:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
url: jdbc:mysql://192.168.0.188:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: root

19
doc/nacos/blade-test.yaml

@ -3,7 +3,7 @@ spring:
redis:
##redis 单机环境配置
##将docker脚本部署的redis服务映射为宿主机ip
host: 192.168.0.157
host: 192.168.0.188
port: 3379
password:
database: 0
@ -14,13 +14,16 @@ spring:
# commandTimeout: 5000
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
#driver-class-name: org.postgresql.Driver
#driver-class-name: oracle.jdbc.OracleDriver
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#driver-class-name: org.postgresql.Driver
#driver-class-name: oracle.jdbc.OracleDriver
#driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
#driver-class-name: dm.jdbc.driver.DmDriver
#driver-class-name: com.yashandb.jdbc.Driver
druid:
# MySql、PostgreSQL、SqlServer校验
# MySql、PostgreSQL、SqlServer、DaMeng校验
validation-query: select 1
# Oracle校验
# Oracle、YashanDB校验
#oracle: true
#validation-query: select 1 from dual
#项目模块集中配置
@ -30,10 +33,10 @@ blade:
##是否启用分布式锁
enabled: false
##将docker脚本部署的redis服务映射为宿主机ip
address: redis://192.168.0.157:3379
address: redis://192.168.0.188:3379
#通用开发生产环境数据库地址(特殊情况可在对应的子工程里配置覆盖)
datasource:
test:
url: jdbc:mysql://192.168.0.157:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
url: jdbc:mysql://192.168.0.188:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: root

20
doc/nacos/blade.yaml

@ -68,7 +68,7 @@ knife4j:
swagger:
title: BladeX 接口文档系统
description: BladeX 接口文档系统
version: 3.1.0.RELEASE
version: 3.2.0.RELEASE
license: Powered By BladeX
license-url: https://bladex.vip
terms-of-service-url: https://bladex.vip
@ -83,8 +83,13 @@ blade:
token:
#是否有状态
state: false
#是否单用户登录
single: false
#单用户登录范围
single-level: all
#token签名
sign-key: 请配置签名
#使用 blade-auth服务 @org.springblade.test.SignKeyGenerator 获取
sign-key: 请配置32位签名
#redis序列化方式
redis:
serializer-type: protostuff
@ -106,6 +111,17 @@ blade:
big-num-to-string: true
#支持text文本请求,与报文加密同时开启
support-text-plain: false
#日志配置
log:
request:
#开启控制台请求日志
enabled: true
#控制台请求日志忽略
skip-url:
- /blade-desk/notice/list
- /blade-chat/weixin/**
#开启错误日志入库
error-log: true
#xss配置
xss:
enabled: true

135
pom.xml

@ -5,11 +5,11 @@
<groupId>org.springblade</groupId>
<artifactId>BladeX-Biz</artifactId>
<version>3.1.0.RELEASE</version>
<version>3.2.0.RELEASE</version>
<packaging>pom</packaging>
<properties>
<bladex.project.version>3.1.0.RELEASE</bladex.project.version>
<bladex.project.version>3.2.0.RELEASE</bladex.project.version>
<java.version>1.8</java.version>
<maven.plugin.version>3.8.1</maven.plugin.version>
@ -19,13 +19,13 @@
<flowable.version>6.4.2</flowable.version>
<dubbo.version>2.7.8</dubbo.version>
<!-- 推荐使用Harbor -->
<docker.registry.url>192.168.0.157</docker.registry.url>
<docker.registry.host>http://${docker.registry.url}:2375</docker.registry.host>
<!-- Docker仓库服务配置 -->
<docker.registry.url>192.168.0.188</docker.registry.url>
<docker.username>admin</docker.username>
<docker.password>Harbor12345</docker.password>
<docker.password>admin12345</docker.password>
<docker.namespace>blade</docker.namespace>
<docker.plugin.version>1.4.13</docker.plugin.version>
<docker.fabric.skip>false</docker.fabric.skip>
<docker.fabric.version>0.42.0</docker.fabric.version>
</properties>
<modules>
@ -54,15 +54,43 @@
</dependencyManagement>
<dependencies>
<!-- Oracle -->
<!--<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc7</artifactId>
</dependency>-->
<!-- PostgreSql -->
<!--<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>-->
<!-- SqlServer -->
<!--<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
</dependency>-->
<!-- DaMeng -->
<!--<dependency>
<groupId>com.dameng</groupId>
<artifactId>DmJdbcDriver18</artifactId>
</dependency>-->
<!--YashanDB-->
<!--<dependency>
<groupId>com.yashandb.jdbc</groupId>
<artifactId>yasdb-jdbc</artifactId>
</dependency>-->
<!--lombok-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
<scope>provided</scope>
</dependency>
</dependencies>
<!-- 本地私服仓库地址 -->
<distributionManagement>
<repository>
<!--此名称要和.m2/settings.xml中设置的ID一致 -->
<id>logpm</id>
@ -87,7 +115,7 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.7.10</version>
<version>2.7.11</version>
<configuration>
<fork>true</fork>
<finalName>${project.build.finalName}</finalName>
@ -101,29 +129,29 @@
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>${docker.plugin.version}</version>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.fabric.version}</version>
<configuration>
<username>${docker.username}</username>
<password>${docker.password}</password>
<repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
<tag>${project.version}</tag>
<useMavenSettingsForAuth>true</useMavenSettingsForAuth>
<skip>true</skip>
<authConfig>
<username>${docker.username}</username>
<password>${docker.password}</password>
</authConfig>
<registry>${docker.registry.url}</registry>
<images>
<image>
<name>${docker.namespace}/${project.build.finalName}:${project.version}</name>
<alias>${project.name}</alias>
<build>
<dockerFile>${project.basedir}/Dockerfile</dockerFile>
</build>
</image>
</images>
<buildArgs>
<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
<JAR_FILE>${basedir}/target/${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
</configuration>
<!--子服务添加如下配置,运行 mvn deploy 命令便会自动打包镜像-->
<!--<executions>
<execution>
<id>default</id>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>-->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@ -139,7 +167,7 @@
<!--suppress UnresolvedMavenProperty -->
<copy overwrite="true"
tofile="${session.executionRootDirectory}/target/${project.artifactId}.jar"
file="${project.build.directory}/${project.artifactId}.jar" />
file="${project.build.directory}/${project.artifactId}.jar"/>
</tasks>
</configuration>
</execution>
@ -148,13 +176,6 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
@ -179,32 +200,34 @@
</plugins>
</build>
<!--<repositories>-->
<!--<repository>-->
<!--<id>aliyun-repos</id>-->
<!--<url>https://maven.aliyun.com/repository/public/</url>-->
<!--<snapshots>-->
<!--<enabled>false</enabled>-->
<!--</snapshots>-->
<!--</repository>-->
<!--<repository>-->
<!--<id>blade-release</id>-->
<!--<name>Release Repository</name>-->
<!--<url>http://nexus.bladex.vip/repository/maven-releases/</url>-->
<!--</repository>-->
<!--&lt;!&ndash; 本地仓库 &ndash;&gt;-->
<!--<repository>-->
<!--<id>logpm-release</id>-->
<!--<name>Release Repository</name>-->
<!--<url>http://192.168.2.100:8081/repository/logpm-release/</url>-->
<!--</repository>-->
<repositories>
<!-- 本地私服地址-->
<repository>
<id>logpm</id>
<name>BladeX Release Repository</name>
<url>http://192.168.10.100:8081/repository/maven-public/</url>
</repository>
<repository>
<id>aliyun-repos</id>
<name>Aliyun Public Repository</name>
<url>https://maven.aliyun.com/repository/public</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>bladex</id>
<name>BladeX Release Repository</name>
<url>https://center.javablade.com/api/packages/blade/maven</url>
</repository>
<!--</repositories>-->
</repositories>
<pluginRepositories>
<pluginRepository>
<id>aliyun-plugin</id>
<url>https://maven.aliyun.com/repository/public/</url>
<name>Aliyun Public Plugin</name>
<url>https://maven.aliyun.com/repository/public</url>
<snapshots>
<enabled>false</enabled>
</snapshots>

4
script/docker/app/.env

@ -1,2 +1,2 @@
REGISTER=192.168.0.157/blade
TAG=3.1.0.RELEASE
REGISTER=192.168.0.188/blade
TAG=3.2.0.RELEASE

6
script/docker/app/deploy.sh

@ -50,9 +50,9 @@ mount(){
cp nginx/web/nginx.conf /docker/nginx/web/nginx.conf
cp -r nginx/web/html /docker/nginx/web/html
fi
if test ! -f "/docker/nacos/init.d/custom.properties" ;then
mkdir -p /docker/nacos/init.d
cp nacos/init.d/custom.properties /docker/nacos/init.d/custom.properties
if test ! -f "/docker/nacos/conf/application.properties" ;then
mkdir -p /docker/nacos/conf
cp nacos/conf/application.properties /docker/nacos/conf/application.properties
fi
if test ! -f "/docker/prometheus/prometheus.yml" ;then
mkdir -p /docker/prometheus

2
script/docker/app/docker-compose.yml

@ -6,7 +6,7 @@ services:
####################################################################################################
nacos:
image: nacos/nacos-server:2.1.2
image: nacos/nacos-server:v2.1.2
hostname: "nacos-standalone"
environment:
- MODE=standalone

6
script/docker/app/nginx/web/nginx.conf

@ -41,9 +41,9 @@ http {
server_name web;
root /usr/share/nginx/html;
location / {
root html;
index index.html;
location /{
index index.html;
error_page 404 /index.html;
}
location ^~ /oauth/redirect {

Loading…
Cancel
Save