lianghanqiang %!s(int64=4) %!d(string=hai) anos
pai
achega
f663c737cd

+ 34 - 36
pom.xml

@@ -305,17 +305,7 @@
             <groupId>org.springframework</groupId>
             <artifactId>spring-test</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-resources-plugin</artifactId>
-            <version>2.4.3</version>
-        </dependency>
 
-        <dependency>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-jar-plugin</artifactId>
-            <version>3.1.0</version>
-        </dependency>
     </dependencies>
 
     <build>
@@ -339,6 +329,13 @@
                     <version>${spring.boot.version}</version>
                     <configuration>
                         <finalName>${project.build.finalName}</finalName>
+                        <layout>ZIP</layout>
+                        <includes>
+                            <include>
+                                <groupId>non-exists</groupId>
+                                <artifactId>non-exists</artifactId>
+                            </include>
+                        </includes>
                     </configuration>
                     <executions>
                         <execution>
@@ -348,35 +345,9 @@
                         </execution>
                     </executions>
                 </plugin>
-                <plugin>
-                    <groupId>com.spotify</groupId>
-                    <artifactId>dockerfile-maven-plugin</artifactId>
-                    <version>${docker.plugin.version}</version>
-                    <configuration>
-                        <username>${docker.username}</username>
-                        <password>${docker.password}</password>
-                        <repository>${docker.registry.url}/${docker.namespace}/${project.build.finalName}</repository>
-                        <tag>${project.version}</tag>
-                        <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
-                        <buildArgs>
-                            <JAR_FILE>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>
             </plugins>
         </pluginManagement>
         <plugins>
-            <!--设置 SpringBoot 打包插件不包含任何 Jar 依赖包-->
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
@@ -393,6 +364,33 @@
                     </compilerArgs>
                 </configuration>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <testFailureIgnore>true</testFailureIgnore>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy-dependencies</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <!--target/lib是依赖jar包的输出目录,根据自己喜好配置-->
+                            <outputDirectory>target/lib</outputDirectory>
+                            <excludeTransitive>false</excludeTransitive>
+                            <stripVersion>false</stripVersion>
+                            <includeScope>runtime</includeScope>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 

+ 0 - 1
src/main/java/org/springblade/payment/callback/trade/UserPayCallback.java

@@ -138,7 +138,6 @@ public class UserPayCallback {
 				AppConstant.SOCKET_PRE.USER.getName()+successParams.getUserId(),
 				JSON.toJSONString(paymentVO)
 			);
-
 			webSocketServer.sendInfo(
 				AppConstant.SOCKET_PRE.SHOP.getName()+successParams.getShopId(),
 				JSON.toJSONString(paymentVO)

+ 8 - 2
src/main/java/org/springblade/payment/handle/Trade.java

@@ -88,11 +88,17 @@ public class Trade {
 			successParams = res.getSuccessParams();
 
 			if(remain.compareTo(BigDecimal.ZERO)==0){
+				//新建事务,保存订单信息,
+				Assert.isTrue(dataHandle.saveOrUpdateEntity(billsService,successParams.getBills()),()->{throw new ServiceException(ResCode.TRADE_ERROR);});
 				//处理积分余额数据变更
 				paymentService.success(successParams);
-				break;
+				return true;
 			}
 		}
+
+		//新建事务,保存订单信息,
+		Assert.isTrue(dataHandle.saveOrUpdateEntity(billsService,successParams.getBills()),()->{throw new ServiceException(ResCode.TRADE_ERROR);});
+		PaymentCache.putSuccessParams(Convert.toStr(successParams.getBills().getId()),successParams);
 	 	return true;
 	}
 
@@ -138,7 +144,7 @@ public class Trade {
 				Assert.isTrue(dataHandle.saveOrUpdateEntity(billsService,successParams.getBills()),()->{throw new ServiceException(ResCode.TRADE_ERROR);});
 				//处理积分余额数据变更
 				paymentService.success(successParams);
-				break;
+				return successParams;
 			}
 		}
 		if(remain.compareTo(BigDecimal.ZERO)>0){

+ 2 - 2
src/main/java/org/springblade/payment/handle/handler/BalanceHandle.java

@@ -73,10 +73,10 @@ public class  BalanceHandle implements BaseHandle {
 
 		BalanceBills balanceBills = buildBills(order, user, handlePrice,successParams.getBills().getId(),pointFee);
 		Assert.isTrue(dataHandle.saveOrUpdateEntity(balanceBillsService,balanceBills),()->{throw new ServiceException(ResCode.TRADE_ERROR);});
+
+
 		successParams.setBalanceBillsId(balanceBills.getId());
 		successParams.getBills().setBalanceNum(handlePrice);
-		successParams.getBills().setPrice(remain);
-
 		return HandleData.builder().isSuccess(Boolean.TRUE).successParams(successParams).remain(remain).build();
 	}
 

+ 6 - 1
src/main/java/org/springblade/payment/handle/handler/WxPayHandle.java

@@ -29,6 +29,8 @@ import java.math.BigDecimal;
 public class WxPayHandle implements BaseHandle {
 
 	private WebSocketServer webSocketServer;
+	private DataHandle dataHandle;
+	private IBillsService billsService;
 
 	/**
 	 * 	未抵消的余额,发送订单信息到用户,用户根据订单信息调起微信支付
@@ -37,7 +39,10 @@ public class WxPayHandle implements BaseHandle {
 	public HandleData handle(BigDecimal remain, Order order, SuccessParams successParams) throws ServiceException {
 
 		Bills bills = successParams.getBills();
-		successParams.getBills().setPayway(PaymentScene.MINI_PROGRAM.name());
+		bills.setPayway(PaymentScene.MINI_PROGRAM.name());
+		bills.setPrice(remain);
+		dataHandle.saveOrUpdateEntity(billsService,bills);
+
 
 		//通知用户调起支付
 		webSocketServer.sendInfo(AppConstant.SOCKET_PRE.USER.getName()+order.getLoginUser().getId().toString(), JSON.toJSONString(bills,new LongTypeFilter()));

+ 4 - 0
src/main/resources/application-prod.yml

@@ -23,6 +23,7 @@ social:
   enabled: true
   domain: http://127.0.0.1:1888
 
+
 #blade配置
 blade:
   #分布式锁配置
@@ -38,3 +39,6 @@ blade:
     remote-mode: true
     upload-domain: http://localhost:8999
     remote-path: /usr/share/nginx/html
+
+logging:
+  config: /data/local/webservice/ldt-new/config/logback-prod.xml

+ 1 - 1
src/main/resources/application.yml

@@ -116,7 +116,7 @@ flowable:
 
 #报表配置
 report:
-  enabled: true
+  enabled: false
   database:
     provider:
       prefix: blade-