|
@@ -53,7 +53,10 @@ import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
-import java.io.*;
|
|
|
|
|
|
|
+import java.io.ByteArrayOutputStream;
|
|
|
|
|
+import java.io.File;
|
|
|
|
|
+import java.io.FileInputStream;
|
|
|
|
|
+import java.io.IOException;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.nio.charset.StandardCharsets;
|
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -202,7 +205,7 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
.nonce(nonce) // 随机数
|
|
.nonce(nonce) // 随机数
|
|
|
.signature(signature)
|
|
.signature(signature)
|
|
|
.timestamp(timestamp)
|
|
.timestamp(timestamp)
|
|
|
- .body(result.toString())
|
|
|
|
|
|
|
+ .body(result.toString(StandardCharsets.UTF_8))
|
|
|
.build();
|
|
.build();
|
|
|
LOGGER.info("微信支付回调{}:构造 RequestParam完毕", no);
|
|
LOGGER.info("微信支付回调{}:构造 RequestParam完毕", no);
|
|
|
|
|
|
|
@@ -664,10 +667,13 @@ public class WxPayServiceImpl implements WxPayService {
|
|
|
public void titleWriteNotice(HttpServletRequest request) {
|
|
public void titleWriteNotice(HttpServletRequest request) {
|
|
|
var notifyRes = handleWxNotify(request);
|
|
var notifyRes = handleWxNotify(request);
|
|
|
try {
|
|
try {
|
|
|
- TitleWriteNotification titleWriteNotification = ((NotificationParser) notifyRes[1]).parse((RequestParam) notifyRes[0], TitleWriteNotification.class);
|
|
|
|
|
|
|
+// TitleWriteNotification titleWriteNotification = ((NotificationParser) notifyRes[1]).parse((RequestParam) notifyRes[0], TitleWriteNotification.class);
|
|
|
|
|
+ Map<String,Object> titleWriteNotification = ((NotificationParser) notifyRes[1]).parse((RequestParam) notifyRes[0], Map.class);
|
|
|
|
|
|
|
|
// 查询用户填写的抬头信息
|
|
// 查询用户填写的抬头信息
|
|
|
- var applyId = titleWriteNotification.getFapiaoApplyId();
|
|
|
|
|
|
|
+// var applyId = titleWriteNotification.getFapiaoApplyId();
|
|
|
|
|
+ var applyId = titleWriteNotification.get("fapiao_apply_id").toString();
|
|
|
|
|
+ LOGGER.info("回调成功,applyId:{}", applyId);
|
|
|
var buyerInformation = userTitle(applyId);
|
|
var buyerInformation = userTitle(applyId);
|
|
|
|
|
|
|
|
// 更新invoice表数据
|
|
// 更新invoice表数据
|