Sfoglia il codice sorgente

添加测试接口

july 4 anni fa
parent
commit
1bc98878cc

+ 11 - 1
ldt-core/src/main/java/org/springblade/gateway/web_gateway/controller/PressureTestController.java

@@ -32,6 +32,7 @@ import org.springblade.wx.constant.MiniProgramType;
 import org.springblade.wx.service.WeChatService;
 import org.springblade.yeePay.common.YeePayConst;
 import org.springblade.yeePay.common.YeepayApiConstant;
+import org.springblade.yeePay.service.YeePayService;
 import org.springframework.context.ApplicationEventPublisher;
 import org.springframework.util.Assert;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -39,6 +40,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.servlet.http.HttpServletRequest;
 import java.math.BigDecimal;
 import java.time.LocalDateTime;
 
@@ -62,6 +64,7 @@ public class PressureTestController {
 	private Trade trade;
 	private ConfigForShop configForShop;
 	private WeChatService weChatService;
+	private YeePayService yeePayService;
 
 	@PostMapping("/userBalanceWithdraw")
 	@ApiOperation(value = "用户余额提现(结算)")
@@ -133,7 +136,7 @@ public class PressureTestController {
 		clientTradeDto.setOpenId("ocWnO5eEuHMhl7RV_ebnp_Ff9A0M");
 		clientTradeDto.setShopId(1440871712886366210L);*/
 
-		synchronized (clientTradeDto.getUserId().toString().intern()){
+		synchronized (clientTradeDto.getUserId().toString().intern()) {
 			LoginUser loginUser = loginUserService.getById(clientTradeDto.getUserId());
 			Assert.notNull(loginUser, () -> {
 				throw new ServiceException(ResCode.USER_NOT_FOUNT);
@@ -201,4 +204,11 @@ public class PressureTestController {
 		weChatService.sendTemplateMessage(openId, MessageTemplate.PAYMENT_NOTICE, content, configForShop.getPaymentPage(), MiniProgramType.SHOP);
 	}
 
+	@PostMapping("/deCodeNotifyData")
+	@ApiModelProperty("回调消息解密")
+	public R deCodeNotifyData(HttpServletRequest request) {
+		JSONObject jsonObject = yeePayService.deCodeNotifyData(request.getParameterMap().get("cipherText")[0]);
+		return R.data(jsonObject.toJSONString());
+	}
+
 }

+ 2 - 0
ldt-core/src/main/resources/application.yml

@@ -261,5 +261,7 @@ crypto:
     - /payment/csurl/
     - /withdraw/callback/
     - /withdraw/csurl/
+    - /pressure_test/scanPay
+    - /pressure_test/deCodeNotifyData