@ -44,7 +44,7 @@ public class MemberAuthCallback extends SPIBaseService implements ExtensionServi
MemberAuthCallBackRequestDTO fields = req . getData ( ) ;
log . info ( "receive callback: " + JSON . toJSONString ( fields ) ) ;
String body = fields . getBody ( ) ;
// String body = "userId=gfZbbg6BSAlPMmw75xlCzQ%3D%3D&cnaliMemberId=b2b-221123084407697b20&authCode=NGNiYzEyODUtNzFhOS01ZmIwLWE5MDEtYzI3ZTAyYWFjOTA2&gmtMemberExpireTime=2023-11-13+23%3A59%3A59&type=auth";
Map < String , String > map = new HashMap < String , String > ( ) ;
// ----逻辑校验----
@ -65,17 +65,26 @@ public class MemberAuthCallback extends SPIBaseService implements ExtensionServi
this . authCode = fields . getAuthCode ( ) ;
log . info ( map . toString ( ) ) ;
Shop1688DsAuth shop1688DsAuth = new Shop1688DsAuth ( ) ;
Shop1688DsAuth shop1688DsAuth = shop1688DsAuthService . getDetailByShopId ( Long . valueOf ( SecurityTool . decodeByAES ( userId ) ) ) ;
if ( Objects . isNull ( shop1688DsAuth ) ) {
shop1688DsAuth = new Shop1688DsAuth ( ) ;
shop1688DsAuthService . insert ( shop1688DsAuth ) ;
}
shop1688DsAuth . setAuthCode ( authCode ) ;
shop1688DsAuth . setShopId ( Long . valueOf ( SecurityTool . decodeByAES ( userId ) ) ) ;
shop1688DsAuthService . insert ( shop1688DsAuth ) ;
shop1688DsAuthService . updateByPrimaryKey ( shop1688DsAuth ) ;
ShopTo1688DsMember shopTo1688DsMember = new ShopTo1688DsMember ( ) ;
ShopTo1688DsMember shopTo1688DsMember = shopTo1688DsMemberService . getDetailByShopId ( Long . valueOf ( SecurityTool . decodeByAES ( userId ) ) ) ;
if ( Objects . isNull ( shopTo1688DsMember ) ) {
shopTo1688DsMember = new ShopTo1688DsMember ( ) ;
shopTo1688DsMemberService . insert ( shopTo1688DsMember ) ;
}
shopTo1688DsMember . setCnaliMemberId ( cnaliMemberId ) ;
shopTo1688DsMember . setShopId ( Long . valueOf ( SecurityTool . decodeByAES ( userId ) ) ) ;
shopTo1688DsMember . setGmtExpire ( gmtMemberExpireTime ) ;
shopTo1688DsMemberService . insert ( shopTo1688DsMember ) ;
shopTo1688DsMemberService . updateByPrimaryKey ( shopTo1688DsMember ) ;
} catch ( Exception e ) {
e . printStackTrace ( ) ;
log . error ( e . getMessage ( ) ) ;
}