|
@@ -32,6 +32,7 @@ import org.springblade.wx.constant.MiniProgramType;
|
|
|
import org.springblade.wx.service.WeChatService;
|
|
import org.springblade.wx.service.WeChatService;
|
|
|
import org.springblade.yeePay.common.YeePayConst;
|
|
import org.springblade.yeePay.common.YeePayConst;
|
|
|
import org.springblade.yeePay.common.YeepayApiConstant;
|
|
import org.springblade.yeePay.common.YeepayApiConstant;
|
|
|
|
|
+import org.springblade.yeePay.service.YeePayService;
|
|
|
import org.springframework.context.ApplicationEventPublisher;
|
|
import org.springframework.context.ApplicationEventPublisher;
|
|
|
import org.springframework.util.Assert;
|
|
import org.springframework.util.Assert;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
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.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import java.math.BigDecimal;
|
|
import java.math.BigDecimal;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
|
|
|
|
@@ -62,6 +64,7 @@ public class PressureTestController {
|
|
|
private Trade trade;
|
|
private Trade trade;
|
|
|
private ConfigForShop configForShop;
|
|
private ConfigForShop configForShop;
|
|
|
private WeChatService weChatService;
|
|
private WeChatService weChatService;
|
|
|
|
|
+ private YeePayService yeePayService;
|
|
|
|
|
|
|
|
@PostMapping("/userBalanceWithdraw")
|
|
@PostMapping("/userBalanceWithdraw")
|
|
|
@ApiOperation(value = "用户余额提现(结算)")
|
|
@ApiOperation(value = "用户余额提现(结算)")
|
|
@@ -133,7 +136,7 @@ public class PressureTestController {
|
|
|
clientTradeDto.setOpenId("ocWnO5eEuHMhl7RV_ebnp_Ff9A0M");
|
|
clientTradeDto.setOpenId("ocWnO5eEuHMhl7RV_ebnp_Ff9A0M");
|
|
|
clientTradeDto.setShopId(1440871712886366210L);*/
|
|
clientTradeDto.setShopId(1440871712886366210L);*/
|
|
|
|
|
|
|
|
- synchronized (clientTradeDto.getUserId().toString().intern()){
|
|
|
|
|
|
|
+ synchronized (clientTradeDto.getUserId().toString().intern()) {
|
|
|
LoginUser loginUser = loginUserService.getById(clientTradeDto.getUserId());
|
|
LoginUser loginUser = loginUserService.getById(clientTradeDto.getUserId());
|
|
|
Assert.notNull(loginUser, () -> {
|
|
Assert.notNull(loginUser, () -> {
|
|
|
throw new ServiceException(ResCode.USER_NOT_FOUNT);
|
|
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);
|
|
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());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|