用户购买授权相关修改

20230922-ljl-fixBug
wangchaoxu 1 year ago
parent b6b6abc068
commit acd1c9ad71

@ -53,10 +53,10 @@ public class ShopAuthCallbackService extends SPIBaseService implements Extension
JSONObject bodyObj = JSONObject.parseObject(reqBody);
Integer msgType = bodyObj.getInteger("msg_type");
if (msgType == 2) { // 授权消息
String msg = bodyObj.getString("msg");
JSONObject msgObj = JSONObject.parseObject(msg);
Long shopId = msgObj.getLong("shop_id");
if (msgType == 2) { // 授权消息
String code = msgObj.getString("code");
String shopName = "";
@ -80,11 +80,15 @@ public class ShopAuthCallbackService extends SPIBaseService implements Extension
shop.setGmtCreate(new Date());
shop.setGmtModified(new Date());
shop.setShopName(shopName);
shopService.insert(shop);
shopService.insertSelective(shop);
}
} else if (msgType == 1) { // 支付消息
}
// 按照三方平台的规范返回成功或失败的body值
String respBody = "{\"success\":true,\"code\":0}";
return BaseResponse.<String>builder().success(true).code("0").data(respBody).build();

@ -88,7 +88,8 @@ public class SecurityTool {
}
public static void main(String[] args) {
String msgSecret = "rzYLiyrSFtW8vSQWrlRTtsSHcH6KZdJGEpCGNZRjNcdXrn1HR39YSMXhj7z36gbeHdqPqR2zbkzO2CMOJz6l1aDFX5ZYTYHsLAIdOyN3RyQYJDihcLzhlACdNf/fEf28srQI37N/7+gVwSApAmnvP7CvBg8X5Hb+2A2cK13jMT8GAskYsNieL982MMPiAZmAF8ktAqN2bLJo/IpxYrW+OXLudrRylWXeLa5fbqO+pZVAtItoGN995lf6iPF8JnWJpQaSBPVuUgU/6Ns5sFWl7A==";
// String msgSecret = "rzYLiyrSFtW8vSQWrlRTtsSHcH6KZdJGEpCGNZRjNcdXrn1HR39YSMXhj7z36gbeHdqPqR2zbkzO2CMOJz6l1aDFX5ZYTYHsLAIdOyN3RyQYJDihcLzhlACdNf/fEf28srQI37N/7+gVwSApAmnvP7CvBg8X5Hb+2A2cK13jMT8GAskYsNieL982MMPiAZmAF8ktAqN2bLJo/IpxYrW+OXLudrRylWXeLa5fbqO+pZVAtItoGN995lf6iPF8JnWJpQaSBPVuUgU/6Ns5sFWl7A==";
String msgSecret = "rzYLiyrSFtW8vSQWrlRTtsSHcH6KZdJGEpCGNZRjNcdXrn1HR39YSMXhj7z36gbeHdqPqR2zbkzO2CMOJz6l1aDFX5ZYTYHsLAIdOyN3RyTiAMe+84MuHM3uxeNkW/JIxvG0fighkM9qD7AtihaXkyzm2EJbnIUO4O4kWmgJxiNDhfqndhNEK/zzTxWvrgIUlZ+cJNDGjiA7XOab5l105cSVdFmay9I74sH907Bg+jz7w8JDIy5hbAK7rphu1Bv9eVQr4ct4wazka/T1/U2AvA==";
String appSecret = "4c927c89-d55c-42cf-805c-694269a4b165";
String key = appSecret.replaceAll("-", "");
String decrypt = decryptDoudianCallback(msgSecret,key);

Loading…
Cancel
Save