模拟登录第三方接口
This commit is contained in:
@@ -60,6 +60,40 @@ public final class LbThirdIntegrationConfigUtil {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public static String resolveFansApiBaseUrl(LbThirdIntegrationConfig config) {
|
||||
String base = trimTrailingSlash(requireText(config.getAdminBaseUrl(), "adminBaseUrl"));
|
||||
String path = config.getFansApiPath();
|
||||
if (!StringUtils.hasText(path)) {
|
||||
path = LbThirdIntegrationConstants.DEFAULT_FANS_API_PATH;
|
||||
}
|
||||
path = path.trim();
|
||||
if (!path.startsWith("/")) {
|
||||
path = "/" + path;
|
||||
}
|
||||
return base + path;
|
||||
}
|
||||
|
||||
public static String resolveLoginApiUrl(LbThirdIntegrationConfig config) {
|
||||
String base = trimTrailingSlash(requireText(config.getAdminBaseUrl(), "adminBaseUrl"));
|
||||
String path = config.getLoginApiPath();
|
||||
if (!StringUtils.hasText(path)) {
|
||||
path = LbThirdIntegrationConstants.DEFAULT_LOGIN_API_PATH;
|
||||
}
|
||||
path = path.trim();
|
||||
if (!path.startsWith("/")) {
|
||||
path = "/" + path;
|
||||
}
|
||||
return base + path;
|
||||
}
|
||||
|
||||
public static int resolveFansPageLimit(LbThirdIntegrationConfig config) {
|
||||
Integer limit = config.getFansPageLimit();
|
||||
if (limit == null || limit < 1) {
|
||||
return LbThirdIntegrationConstants.DEFAULT_FANS_PAGE_LIMIT;
|
||||
}
|
||||
return limit;
|
||||
}
|
||||
|
||||
public static String resolveUserSelectBaseUrl(LbThirdIntegrationConfig config) {
|
||||
String base = trimTrailingSlash(requireText(config.getAdminBaseUrl(), "adminBaseUrl"));
|
||||
String path = config.getUserSelectPath();
|
||||
|
||||
Reference in New Issue
Block a user