|
|
|
@ -3,9 +3,12 @@ package com.ms.biz.service.impl;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
import com.doudian.open.core.AccessToken;
|
|
|
|
|
import com.ms.api.dto.dsapi.response.CheckDsAppAuthExpireResponseDTO;
|
|
|
|
|
import com.ms.api.dto.dsapi.response.CommonResponseDTO;
|
|
|
|
|
import com.ms.api.dto.dsapi.response.GetPlatformAuthUrlResponseDTO;
|
|
|
|
|
import com.ms.biz.dto.openspi.request.QuerySupplyPlatformAuthParam;
|
|
|
|
|
import com.ms.biz.dto.openspi.response.QuerySupplyPlatformAuthData;
|
|
|
|
@ -111,8 +114,9 @@ public class ShopServiceImpl implements ShopService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void querySupplyPlatformAuth(QuerySupplyPlatformAuthParam param, QuerySupplyPlatformAuthData data) {
|
|
|
|
|
ShopBO shop = getShopInfo(param.getShopId());
|
|
|
|
|
ShopTo1688DsMember shopTo1688DsMember = shopTo1688DsMemberMapper.getDetailByShopId(param.getShopId());
|
|
|
|
|
Long shopId = param.getShopId();
|
|
|
|
|
ShopBO shop = getShopInfo(shopId);
|
|
|
|
|
ShopTo1688DsMember shopTo1688DsMember = shopTo1688DsMemberMapper.getDetailByShopId(shopId);
|
|
|
|
|
boolean authorized = false;
|
|
|
|
|
if (shopTo1688DsMember != null && shopTo1688DsMember.getGmtExpire() != null) {
|
|
|
|
|
Date gmtExpire = CommonTool.parseDate(shopTo1688DsMember.getGmtExpire());
|
|
|
|
@ -120,6 +124,13 @@ public class ShopServiceImpl implements ShopService {
|
|
|
|
|
authorized = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CheckDsAppAuthExpireResponseDTO responseDTO = dsApiService.checkDsAppAuthExpire(shopId, "", "");
|
|
|
|
|
CommonResponseDTO res = responseDTO.getUserIdAndCheckRetMap().get(shopId);
|
|
|
|
|
if (!res.isSuccess()) {
|
|
|
|
|
authorized = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GetPlatformAuthUrlResponseDTO response = dsApiService.getPlatformAuthUrl(shop);
|
|
|
|
|
if (response.isSuccess()) {
|
|
|
|
|
data.setAuthorized(authorized);
|
|
|
|
|