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

@ -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;
}

@ -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();

Loading…
Cancel
Save