diff --git a/ms-biz/src/main/java/com/ms/biz/dto/openspi/response/QuerySupplyPlatformAuthData.java b/ms-biz/src/main/java/com/ms/biz/dto/openspi/response/QuerySupplyPlatformAuthData.java index d3b53ac..2a613b4 100644 --- a/ms-biz/src/main/java/com/ms/biz/dto/openspi/response/QuerySupplyPlatformAuthData.java +++ b/ms-biz/src/main/java/com/ms/biz/dto/openspi/response/QuerySupplyPlatformAuthData.java @@ -1,13 +1,16 @@ package com.ms.biz.dto.openspi.response; +import com.alibaba.fastjson.annotation.JSONField; import com.doudian.open.gson.annotations.SerializedName; import lombok.Data; @Data public class QuerySupplyPlatformAuthData { + @JSONField(name = "authorized") @SerializedName("authorized") private boolean authorized; + @JSONField(name = "auth_url") @SerializedName("auth_url") private String authUrl; } diff --git a/ms-biz/src/main/java/com/ms/biz/spi/callback/MemberAuthCallbackService.java b/ms-biz/src/main/java/com/ms/biz/spi/callback/MemberAuthCallbackService.java index 23bdb5f..e25b383 100644 --- a/ms-biz/src/main/java/com/ms/biz/spi/callback/MemberAuthCallbackService.java +++ b/ms-biz/src/main/java/com/ms/biz/spi/callback/MemberAuthCallbackService.java @@ -18,6 +18,7 @@ import com.ms.dal.entity.ShopTo1688DsMember; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import java.util.Date; import java.util.Objects; /** @@ -47,21 +48,25 @@ public class MemberAuthCallbackService extends SPIBaseService implements Extensi Shop1688DsAuth shop1688DsAuth = shop1688DsAuthService.getDetailByShopId(Long.valueOf(userId)); if (Objects.isNull(shop1688DsAuth)) { shop1688DsAuth = new Shop1688DsAuth(); + shop1688DsAuth.setGmtCreate(new Date()); shop1688DsAuthService.insert(shop1688DsAuth); } shop1688DsAuth.setAuthCode(authCode); shop1688DsAuth.setShopId(Long.valueOf(userId)); + shop1688DsAuth.setGmtModified(new Date()); log.info("receive callback: " + shop1688DsAuth); shop1688DsAuthService.updateByPrimaryKey(shop1688DsAuth); ShopTo1688DsMember shopTo1688DsMember = shopTo1688DsMemberService.getDetailByShopId(Long.valueOf(userId)); if (Objects.isNull(shopTo1688DsMember)) { shopTo1688DsMember = new ShopTo1688DsMember(); + shopTo1688DsMember.setGmtCreate(new Date()); shopTo1688DsMemberService.insert(shopTo1688DsMember); } shopTo1688DsMember.setCnaliMemberId(cnaliMemberId); shopTo1688DsMember.setShopId(Long.valueOf(userId)); shopTo1688DsMember.setGmtExpire(gmtMemberExpireTime); + shopTo1688DsMember.setGmtModified(new Date()); shopTo1688DsMemberService.updateByPrimaryKey(shopTo1688DsMember); } catch (Exception e) { e.printStackTrace();