记得上下班打卡 | git大法好,push需谨慎

Commit ff7a2d27 authored by anjiabin's avatar anjiabin

商户通知参数格式修改

parent 4637c8fd
...@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component; ...@@ -18,6 +18,7 @@ import org.springframework.stereotype.Component;
import org.springframework.util.MultiValueMap; import org.springframework.util.MultiValueMap;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -90,7 +91,7 @@ public class DragonPayBiz { ...@@ -90,7 +91,7 @@ public class DragonPayBiz {
params.add("price", payNotifyDto.getPrice().toString()); params.add("price", payNotifyDto.getPrice().toString());
params.add("paymentType", payNotifyDto.getPaymentType()); params.add("paymentType", payNotifyDto.getPaymentType());
params.add("paymentAt", payNotifyDto.getPaymentAt()); params.add("paymentAt", payNotifyDto.getPaymentAt());
jsonData = JsonUtils.toJson(params); jsonData = JsonUtils.toJson(covertNVPS2Params(params));
log.info("dragon:notify:post url:{}",payNotifyReqBo.getNotifyUrl()); log.info("dragon:notify:post url:{}",payNotifyReqBo.getNotifyUrl());
log.info("dragon:notify:post data:{}",jsonData); log.info("dragon:notify:post data:{}",jsonData);
...@@ -205,4 +206,12 @@ public class DragonPayBiz { ...@@ -205,4 +206,12 @@ public class DragonPayBiz {
} }
return rsMap; return rsMap;
} }
private static Map<String, Object> covertNVPS2Params(MultiValueMap<String, String> params) {
Map<String, Object> rsMap = new HashMap<>();
for (Map.Entry<String, List<String>> param : params.entrySet()) {
rsMap.put(param.getKey(), param.getValue().get(0));
}
return rsMap;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment