|
|
@ -19,6 +19,7 @@ import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.modelmapper.ModelMapper;
|
|
|
|
import org.modelmapper.ModelMapper;
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -44,6 +45,8 @@ public class SPIBaseService {
|
|
|
|
if (Objects.isNull(shop)) {
|
|
|
|
if (Objects.isNull(shop)) {
|
|
|
|
shop = new Shop();
|
|
|
|
shop = new Shop();
|
|
|
|
shop.setShopId(shopId);
|
|
|
|
shop.setShopId(shopId);
|
|
|
|
|
|
|
|
shop.setGmtCreate(new Date());
|
|
|
|
|
|
|
|
shop.setGmtModified(new Date());
|
|
|
|
shopService.insert(shop);
|
|
|
|
shopService.insert(shop);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -63,6 +66,8 @@ public class SPIBaseService {
|
|
|
|
shop.setAccessToken(SecurityTool.encodeByAES(data.getAccessToken())); // 加密
|
|
|
|
shop.setAccessToken(SecurityTool.encodeByAES(data.getAccessToken())); // 加密
|
|
|
|
shop.setRefreshToken(SecurityTool.encodeByAES(data.getRefreshToken())); // 加密
|
|
|
|
shop.setRefreshToken(SecurityTool.encodeByAES(data.getRefreshToken())); // 加密
|
|
|
|
shop.setExpiresIn(data.getExpiresIn().toString()); // TODO 这里使用时间格式
|
|
|
|
shop.setExpiresIn(data.getExpiresIn().toString()); // TODO 这里使用时间格式
|
|
|
|
|
|
|
|
shop.setGmtExpire(new Date(data.getExpiresIn() * 1000L));
|
|
|
|
|
|
|
|
shop.setGmtModified(new Date());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
shopService.updateByPrimaryKey(shop);
|
|
|
|
shopService.updateByPrimaryKey(shop);
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|