!!!【重大通知】 本人收到了艿艿的邀请 参与了 芋道源码 / ruoyi-vue-pro 项目的维护和完善
昨天对接公司的支付宝回调功能时,发现了 项目的支付宝回调参数为空
这不能容忍马上打印日志看看:
确实是空的,但是参数也传过来了 是 getbody下面那坨
但是
是一个对象转过来的参数
gmt_create=2022-04-26+15%3A21%3A34&charset=utf-8&seller_email=lihaotian%40heypad.cn&subject=%E5%B9%BF%E5%91%8A%E6%8A%95%E6%94%BE%E8%B4%B9%E7%94%A8&sign=gH2i1zj6gtOxv94HJW5CrG4zCR0OgEG4NYQyh19YAkkslBh90SxW%2BQHcbdsVzGdR1ME2BZSGigJi72WvxzUMzvcawIXy92mRKK44ybTKzClNi5ijcvf73ClPC8JKf%2F4K91BX1nbE3Ru4pxV7zDSsOGWtpb4fqXkPW8ayoLcACS7dpA%2BglWPQ8LMuEVSoojMNXe868cgKmh%2B%2FTmvSo91eCYtfvp6jgbT%2BysZEDcZIa3XZ60eLjWsruLjj3Bo16xWbumqOiOKd%2FezYiI%2FcIN1RSXo4Oe3HrQNV6wHL4QAcAkqcXoGKGBhRoZrTfd6GeprzOReFKxwA8YfH0hqMkmqiAA%3D%3D&buyer_id=2088422637963019&body=%E5%B9%BF%E5%91%8A%E6%8A%95%E6%94%BE%E8%B4%B9%E7%94%A8&invoice_amount=0.01¬ify_id=2022042600222152139063011453085210&fund_bill_list=%5B%7B%22amount%22%3A%220.01%22%2C%22fundChannel%22%3A%22PCREDIT%22%7D%5D¬ify_type=trade_status_sync&trade_status=TRADE_SUCCESS&receipt_amount=0.01&buyer_pay_amount=0.01&app_id=2021002145630076&sign_type=RSA2&seller_id=2088141153297993&gmt_payment=2022-04-26+15%3A21%3A38¬ify_time=2022-04-26+15%3A24%3A32&version=1.0&out_trade_no=2022042615204482281&total_amount=0.01&trade_no=2022042622001463011423645193&auth_app_id=2021002145630076&buyer_logon_id=183****9133&point_amount=0.00
看来只能吧这坨东西转成一个map了
具体规矩看具体代码 如下是符合项目的逻辑
public static Map<String, String> strToMap(String s) {
Map<String, String> stringStringMap = new HashMap<>();
String s3 = s.replaceAll("%3A", ":");
String s4 = s3.replace("+", " ");
String[] split = s4.split("&");
for (String s1 : split) {
String[] split1 = s1.split("=");
stringStringMap.put(split1[0], split1[1]);
}
return stringStringMap;
}
提交pr!! 然后 收到了作者的回复邀请我参与项目的完善 哈哈嗨!!!!!
!