|
|
package com.ui.project;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
public class ProjectOnline {
|
|
|
private final static String JAVA_ENV_QCLOUD_AZ1="qcloud";
|
|
|
private final static String JAVA_ENV_QCLOUD_AZ2="qcloudaz2";
|
|
|
private final static String JAVA_ENV_QCLOUD_AZ3="qcloudaz3";
|
|
|
public final static String JAVA_ENV_ALL=JAVA_ENV_QCLOUD_AZ1+","+JAVA_ENV_QCLOUD_AZ2+","+JAVA_ENV_QCLOUD_AZ3;
|
|
|
|
|
|
///// 暂时只有media有
|
|
|
private final static String JAVA_ENV_QCLOUD_ENV_GRAY="qcloud_gray";
|
|
|
|
|
|
private static List<Project> JAVA_LIST = new ArrayList<>();
|
|
|
private static Map<String,Project> JAVA_MAP = new HashMap<>();
|
|
|
|
|
|
static{
|
|
|
// java 核心服务
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-activity","129","yoho30",JAVA_ENV_ALL, "java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-wechat","248","yoho30",JAVA_ENV_ALL, "java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yoho-sns","125","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yoho-erp-gateway","977","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yoho-message","123","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","uic","439","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yoho-users","134","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-resources","122","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-promotion","140","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-product","143","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-order","124","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-brower","131","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-bigdata","144","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yoho-gateway","126","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-risk","932","yoho30",JAVA_ENV_ALL,"java 核心服务",true));
|
|
|
|
|
|
//只有qcloud : java服务-单中心
|
|
|
JAVA_LIST.add(new Project("1","yoho-push","137","yoho30",JAVA_ENV_QCLOUD_AZ1,"java服务-单中心",true));
|
|
|
JAVA_LIST.add(new Project("1","cms_push","514","yoho30",JAVA_ENV_QCLOUD_AZ1,"java服务-单中心",true));
|
|
|
JAVA_LIST.add(new Project("1","yoho-social","353","yoho30",JAVA_ENV_QCLOUD_AZ1,"java服务-单中心",true));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-union","133","yoho30",JAVA_ENV_QCLOUD_AZ1,"java服务-单中心",true));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-crm","275","yoho30",JAVA_ENV_QCLOUD_AZ1,"java服务-单中心",true));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-task","138","yoho30",JAVA_ENV_QCLOUD_AZ1,"java服务-单中心",true));
|
|
|
JAVA_LIST.add(new Project("1","yoho-message-controller","684","yoho30",JAVA_ENV_QCLOUD_AZ1,"java服务-单中心",true));
|
|
|
JAVA_LIST.add(new Project("1","yoho-message-sender","685","yoho30",JAVA_ENV_QCLOUD_AZ1,"java服务-单中心",true));
|
|
|
|
|
|
|
|
|
//只有灰度环境: 媒体java (灰度)
|
|
|
JAVA_LIST.add(new Project("1", "yoho-now", "690", "YOHONow",JAVA_ENV_QCLOUD_ENV_GRAY,"媒体java (灰度)",false));
|
|
|
JAVA_LIST.add(new Project("1","yoho-mars","737","media",JAVA_ENV_QCLOUD_ENV_GRAY,"媒体java (灰度)",false));
|
|
|
JAVA_LIST.add(new Project("1","yohomars-platform","764","media",JAVA_ENV_QCLOUD_ENV_GRAY,"媒体java (灰度)",false));
|
|
|
JAVA_LIST.add(new Project("1","yohonow-platform","775","media",JAVA_ENV_QCLOUD_ENV_GRAY,"媒体java (灰度)",false));
|
|
|
|
|
|
|
|
|
//JAVA_LIST.add(new Project("1","yoho-cobar","461","yoho30"));
|
|
|
//JAVA_LIST.add(new Project("1","yohobuy-global","679","yoho30"));
|
|
|
//JAVA_LIST.add(new Project("1","mars_push","494","yoho30"));
|
|
|
//JAVA_LIST.add(new Project("1","yoho-union-recomand","789","yoho30"));
|
|
|
|
|
|
//只有qcloud、 qcloud灰度。 线下店java服务
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-shops","490","yoho30",JAVA_ENV_QCLOUD_AZ1+","+JAVA_ENV_QCLOUD_ENV_GRAY,"线下店java服务",false));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-portal-gateway","557","yoho30",JAVA_ENV_QCLOUD_AZ1+","+JAVA_ENV_QCLOUD_ENV_GRAY,"线下店java服务",false));
|
|
|
JAVA_LIST.add(new Project("1","yohobuy-extendstore","852","yoho30",JAVA_ENV_QCLOUD_AZ1+","+JAVA_ENV_QCLOUD_ENV_GRAY,"线下店java服务",false));
|
|
|
|
|
|
|
|
|
|
|
|
JAVA_LIST.add(new Project("2","yoho-search-service","12","yoho-search",JAVA_ENV_QCLOUD_AZ1+","+JAVA_ENV_QCLOUD_AZ2,"",true));
|
|
|
JAVA_LIST.add(new Project("2","yoho-search-consumer","8","yoho-search",JAVA_ENV_QCLOUD_AZ1+","+JAVA_ENV_QCLOUD_AZ2,"",true));
|
|
|
JAVA_LIST.add(new Project("2","yoho-search-producer","7","yoho-search",JAVA_ENV_QCLOUD_AZ1+","+JAVA_ENV_QCLOUD_AZ2,"",true));
|
|
|
JAVA_LIST.add(new Project("2","yoho-search-adaptor","13","yoho-search",JAVA_ENV_QCLOUD_AZ1+","+JAVA_ENV_QCLOUD_AZ2,"",true));
|
|
|
JAVA_LIST.add(new Project("2","yohomars-search-service","554","yoho-search",JAVA_ENV_QCLOUD_AZ1,"",true));
|
|
|
|
|
|
|
|
|
JAVA_LIST.add(new Project("3","yohobuy-platform","110","platform",JAVA_ENV_QCLOUD_AZ1+","+JAVA_ENV_QCLOUD_ENV_GRAY,"",true));
|
|
|
|
|
|
//把list转成map,放到最后
|
|
|
JAVA_MAP=JAVA_LIST.stream().collect(Collectors.toMap(Project::getName,Project->Project));
|
|
|
|
|
|
}
|
|
|
|
|
|
public static List<Project> getJavaList() {
|
|
|
return JAVA_LIST;
|
|
|
}
|
|
|
|
|
|
public static Project getJavaProjectByName(String projectName) {
|
|
|
return JAVA_MAP.get(projectName);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 中心切换之后,需要
|
|
|
*/
|
|
|
public static List<Project> getNeedRestartJavaList() {
|
|
|
return JAVA_LIST.stream().filter(p->p.isNeedRestartAfterSwitch()).collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
|
} |