|
|
|
@ -53,10 +53,10 @@ public class ShopAuthCallbackService extends SPIBaseService implements Extension
|
|
|
|
|
|
|
|
|
|
JSONObject bodyObj = JSONObject.parseObject(reqBody);
|
|
|
|
|
Integer msgType = bodyObj.getInteger("msg_type");
|
|
|
|
|
String msg = bodyObj.getString("msg");
|
|
|
|
|
JSONObject msgObj = JSONObject.parseObject(msg);
|
|
|
|
|
Long shopId = msgObj.getLong("shop_id");
|
|
|
|
|
if (msgType == 2) { // 授权消息
|
|
|
|
|
String msg = bodyObj.getString("msg");
|
|
|
|
|
JSONObject msgObj = JSONObject.parseObject(msg);
|
|
|
|
|
Long shopId = msgObj.getLong("shop_id");
|
|
|
|
|
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();
|
|
|
|
|