20240115-ljl-multiPay
ljl 1 year ago
parent 2bde53c616
commit 6aede06cd4

@ -1,13 +1,16 @@
package com.ms.biz.dto.openspi.response; package com.ms.biz.dto.openspi.response;
import com.alibaba.fastjson.annotation.JSONField;
import com.doudian.open.gson.annotations.SerializedName; import com.doudian.open.gson.annotations.SerializedName;
import lombok.Data; import lombok.Data;
@Data @Data
public class QuerySupplyPlatformAuthData { public class QuerySupplyPlatformAuthData {
@JSONField(name = "authorized")
@SerializedName("authorized") @SerializedName("authorized")
private boolean authorized; private boolean authorized;
@JSONField(name = "auth_url")
@SerializedName("auth_url") @SerializedName("auth_url")
private String authUrl; private String authUrl;
} }

@ -18,6 +18,7 @@ import com.ms.dal.entity.ShopTo1688DsMember;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
import java.util.Objects; import java.util.Objects;
/** /**
@ -47,21 +48,25 @@ public class MemberAuthCallbackService extends SPIBaseService implements Extensi
Shop1688DsAuth shop1688DsAuth = shop1688DsAuthService.getDetailByShopId(Long.valueOf(userId)); Shop1688DsAuth shop1688DsAuth = shop1688DsAuthService.getDetailByShopId(Long.valueOf(userId));
if (Objects.isNull(shop1688DsAuth)) { if (Objects.isNull(shop1688DsAuth)) {
shop1688DsAuth = new Shop1688DsAuth(); shop1688DsAuth = new Shop1688DsAuth();
shop1688DsAuth.setGmtCreate(new Date());
shop1688DsAuthService.insert(shop1688DsAuth); shop1688DsAuthService.insert(shop1688DsAuth);
} }
shop1688DsAuth.setAuthCode(authCode); shop1688DsAuth.setAuthCode(authCode);
shop1688DsAuth.setShopId(Long.valueOf(userId)); shop1688DsAuth.setShopId(Long.valueOf(userId));
shop1688DsAuth.setGmtModified(new Date());
log.info("receive callback: " + shop1688DsAuth); log.info("receive callback: " + shop1688DsAuth);
shop1688DsAuthService.updateByPrimaryKey(shop1688DsAuth); shop1688DsAuthService.updateByPrimaryKey(shop1688DsAuth);
ShopTo1688DsMember shopTo1688DsMember = shopTo1688DsMemberService.getDetailByShopId(Long.valueOf(userId)); ShopTo1688DsMember shopTo1688DsMember = shopTo1688DsMemberService.getDetailByShopId(Long.valueOf(userId));
if (Objects.isNull(shopTo1688DsMember)) { if (Objects.isNull(shopTo1688DsMember)) {
shopTo1688DsMember = new ShopTo1688DsMember(); shopTo1688DsMember = new ShopTo1688DsMember();
shopTo1688DsMember.setGmtCreate(new Date());
shopTo1688DsMemberService.insert(shopTo1688DsMember); shopTo1688DsMemberService.insert(shopTo1688DsMember);
} }
shopTo1688DsMember.setCnaliMemberId(cnaliMemberId); shopTo1688DsMember.setCnaliMemberId(cnaliMemberId);
shopTo1688DsMember.setShopId(Long.valueOf(userId)); shopTo1688DsMember.setShopId(Long.valueOf(userId));
shopTo1688DsMember.setGmtExpire(gmtMemberExpireTime); shopTo1688DsMember.setGmtExpire(gmtMemberExpireTime);
shopTo1688DsMember.setGmtModified(new Date());
shopTo1688DsMemberService.updateByPrimaryKey(shopTo1688DsMember); shopTo1688DsMemberService.updateByPrimaryKey(shopTo1688DsMember);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

Loading…
Cancel
Save