ProjectOnline.java 4.84 KB
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="qcloud,qcloud_gray";
	private final static String JAVA_ENV_QCLOUD_AZ2="qcloudaz2";
	public final static String JAVA_ENV_ALL=JAVA_ENV_QCLOUD+","+JAVA_ENV_QCLOUD_AZ2;

	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 核心服务"));
		JAVA_LIST.add(new Project("1","yohobuy-wechat","248","yoho30",JAVA_ENV_ALL, "java 核心服务"));
		JAVA_LIST.add(new Project("1","yoho-sns","125","yoho30",JAVA_ENV_ALL,"java 核心服务"));
		JAVA_LIST.add(new Project("1","yoho-erp-gateway","977","yoho30",JAVA_ENV_ALL,"java 核心服务"));
		JAVA_LIST.add(new Project("1","yoho-message","123","yoho30",JAVA_ENV_ALL,"java 核心服务"));
		JAVA_LIST.add(new Project("1","uic","439","yoho30",JAVA_ENV_ALL,"java 核心服务"));
		JAVA_LIST.add(new Project("1","yoho-users","134","yoho30",JAVA_ENV_ALL,"java 核心服务"));
		JAVA_LIST.add(new Project("1","yohobuy-resources","122","yoho30",JAVA_ENV_ALL,"java 核心服务"));
		JAVA_LIST.add(new Project("1","yohobuy-promotion","140","yoho30",JAVA_ENV_ALL,"java 核心服务"));
		JAVA_LIST.add(new Project("1","yohobuy-product","143","yoho30",JAVA_ENV_ALL,"java 核心服务"));
		JAVA_LIST.add(new Project("1","yohobuy-order","124","yoho30",JAVA_ENV_ALL,"java 核心服务"));
		JAVA_LIST.add(new Project("1","yohobuy-brower","131","yoho30",JAVA_ENV_ALL,"java 核心服务"));
		JAVA_LIST.add(new Project("1","yohobuy-bigdata","144","yoho30",JAVA_ENV_ALL,"java 核心服务"));
		JAVA_LIST.add(new Project("1","yoho-gateway","126","yoho30",JAVA_ENV_ALL,"java 核心服务"));
		JAVA_LIST.add(new Project("1","yohobuy-risk","932","yoho30",JAVA_ENV_ALL,"java 核心服务"));

		//只有qcloud : java服务-单中心
		JAVA_LIST.add(new Project("1","yoho-push","137","yoho30","qcloud","java服务-单中心"));
		JAVA_LIST.add(new Project("1","cms_push","514","yoho30","qcloud","java服务-单中心"));
		JAVA_LIST.add(new Project("1","yoho-social","353","yoho30","qcloud,qcloud_gray","java服务-单中心"));
		JAVA_LIST.add(new Project("1","yohobuy-union","133","yoho30","qcloud","java服务-单中心"));
		JAVA_LIST.add(new Project("1","yohobuy-crm","275","yoho30","qcloud","java服务-单中心"));
		JAVA_LIST.add(new Project("1","yohobuy-task","138","yoho30","qcloud","java服务-单中心"));
		JAVA_LIST.add(new Project("1","yoho-message-controller","684","yoho30","qcloud","java服务-单中心"));
		JAVA_LIST.add(new Project("1","yoho-message-sender","685","yoho30","qcloud","java服务-单中心"));


		//只有qcloud_gray: 媒体java (灰度)
		JAVA_LIST.add(new Project("1", "yoho-now", "690", "YOHONow","qcloud_gray","媒体java (灰度)"));
		JAVA_LIST.add(new Project("1","yoho-mars","737","media","qcloud_gray","媒体java (灰度)"));
		JAVA_LIST.add(new Project("1","yohomars-platform","764","media","qcloud_gray","媒体java (灰度)"));
		JAVA_LIST.add(new Project("1","yohonow-platform","775","media","qcloud_gray","媒体java (灰度)"));


		//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,"线下店java服务"));
		JAVA_LIST.add(new Project("1","yohobuy-portal-gateway","557","yoho30",JAVA_ENV_QCLOUD,"线下店java服务"));
		JAVA_LIST.add(new Project("1","yohobuy-extendstore","852","yoho30",JAVA_ENV_QCLOUD,"线下店java服务"));



		JAVA_LIST.add(new Project("2","yoho-search-service","12","yoho-search","qcloud,"+JAVA_ENV_QCLOUD_AZ2,""));
		JAVA_LIST.add(new Project("2","yoho-search-consumer","8","yoho-search","qcloud,"+JAVA_ENV_QCLOUD_AZ2,""));
		JAVA_LIST.add(new Project("2","yoho-search-producer","7","yoho-search","qcloud,"+JAVA_ENV_QCLOUD_AZ2,""));
		JAVA_LIST.add(new Project("2","yoho-search-adaptor","13","yoho-search","qcloud,"+JAVA_ENV_QCLOUD_AZ2,""));
		JAVA_LIST.add(new Project("2","yohomars-search-service","554","yoho-search",JAVA_ENV_QCLOUD,""));


		JAVA_LIST.add(new Project("3","yohobuy-platform","110","platform",JAVA_ENV_QCLOUD,""));

		//把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);
	}

}