july 4 лет назад
Родитель
Сommit
05f4af453a

+ 2 - 0
ldt-core/src/main/java/org/springblade/common/utils/GlobalExceptionHandler.java

@@ -10,6 +10,7 @@ import org.springblade.ldt.bills.service.IPointBillsService;
 import org.springblade.ldt.user.service.ILoginUserService;
 import org.springblade.ldt.user.service.IUserChannelPointService;
 import org.springblade.payment.handle.handler.CancelTradeHandle;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.ControllerAdvice;
 import org.springframework.web.bind.annotation.ExceptionHandler;
@@ -26,6 +27,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
 @ControllerAdvice
 @ResponseBody
 public class GlobalExceptionHandler {
+	@Autowired
 	private CancelTradeHandle cancelTradeHandle;
 
 	@ExceptionHandler(YopServiceException.class)

+ 3 - 3
ldt-core/src/main/java/org/springblade/gateway/client_gateway/controller/ClientTradeController.java

@@ -6,7 +6,6 @@ import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springblade.common.cache.PaymentCache;
 import org.springblade.common.enums.*;
-import org.springblade.common.utils.TradeException;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.tool.api.R;
 import org.springblade.gateway.client_gateway.entity.dto.ClientTradeDto;
@@ -66,14 +65,15 @@ public class ClientTradeController {
 			.openId(loginUser.getOpenid())
 			.build();
 
-		SuccessParams successParams = null;
+		/*SuccessParams successParams = null;
 
 		try {
 			successParams = trade.tradeForScanPay(order, clientTradeDto.getChannelId());
 		} catch (Exception e) {
 			e.printStackTrace();
 			throw new TradeException(ResCode.TRADE_ERROR, successParams);
-		}
+		}*/
+		SuccessParams successParams = trade.tradeForScanPay(order, clientTradeDto.getChannelId());
 		return R.data(successParams);
 	}
 

+ 2 - 8
ldt-core/src/main/java/org/springblade/gateway/web_gateway/controller/PressureTestController.java

@@ -149,14 +149,8 @@ public class PressureTestController {
 			.openId(loginUser.getOpenid())
 			.build();
 
-		SuccessParams successParams = null;
-
-		try {
-			successParams = trade.tradeForScanPay(order, clientTradeDto.getChannelId());
-		} catch (Exception e) {
-			e.printStackTrace();
-			throw new ServiceException(ResCode.TRADE_ERROR);
-		}
+		SuccessParams successParams = trade.tradeForScanPay(order, clientTradeDto.getChannelId());
+
 		String res = "{\"channelOrderId\":\"4200001127202110301273440365\"," +
 			"\"orderId\":\"" + successParams.getBills().getId() + "\"," +
 			"\"bankOrderId\":\"5062869652211030\"," +